34aa81447b74b182fcfc419ba02e7e1cbed95292,poker/table_analysers/table_screen_based.py,TableScreenBased,get_round_pot_value,#TableScreenBased#Any#,610

Before Change



        value = self.get_ocr_float(pil_image, "TotalPotValue", force_method=1)

        try:
            if not str(value) == "":
                value = float(re.findall(r"\d{1,2}\.\d{1,2}", str(value))[0])
        except:
            self.logger.warning("Round pot regex problem: " + str(value))
            value = ""
            self.logger.warning("unable to get round pot value")
            self.gui_signals.signal_status.emit("Unable to get round pot value")
            pil_image.save("pics/ErrRoundPotValue.png")
            self.round_pot_value = h.previous_round_pot_value

        if value == "":
            self.round_pot_value = 0
        else:
            self.round_pot_value = value

        self.logger.info("Final round pot Value: " + str(self.round_pot_value))
        return True

After Change


        pil_image = self.crop_image(self.entireScreenPIL, self.tlc[0] + func_dict["x1"], self.tlc[1] + func_dict["y1"],
                                    self.tlc[0] + func_dict["x2"], self.tlc[1] + func_dict["y2"])

        self.round_pot_value = self.find_value("round_pot_value", screenshot_pilImage, 0.06) 

        if self.round_pot_value != "":
            self.round_pot_value = float(self.round_pot_value)

        if self.round_pot_value == "":
            self.round_pot_value = 0
            self.gui_signals.signal_status.emit("Unable to get round pot value")
            self.logger.warning("unable to get round pot value")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_round_pot_value


Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_bot_pot


Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_total_pot_value