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"])
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("Total pot regex problem: " + str(value))
value = ""
self.logger.warning("unable to get pot value")
self.gui_signals.signal_status.emit("Unable to get pot value")
pil_image.save("pics/ErrPotValue.png")
self.totalPotValue = h.previousPot
if value == "":
self.totalPotValue = 0
else:
self.totalPotValue = value
self.logger.info("Final Total Pot Value: " + str(self.totalPotValue))
return True