I am running tesseract v5.3.3.20231005
I am trying to turn the number in this image above into an integer value.
Here is my code:
# Convert the extracted text to a number (if it contains numerical characters)
number_text = pytesseract.image_to_string(buy_offers_screenshot)
buy_offer = float(''.join(filter(str.isdigit, number_text)))
print(buy_offer)
But the response I get is:
Traceback (most recent call last):
File "C:\python\tesseract.py", line 8, in <module>
buy_offer = float(''.join(filter(str.isdigit, number_text)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: ''
Could anyone point me in the right direction on how to get an integer value from this screenshot?
