EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

Issue with readtextlang

Open yoli1888 opened this issue 3 years ago • 5 comments

I am trying to test the new function readtextlang() using Python3. Get error:

result = reader.readtextlang("test.png")

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/easyocr/easyocr.py", line 447, in readtextlang for filename in os.listdir(directory): FileNotFoundError: [Errno 2] No such file or directory: 'characters/'

Is there a workaround?

yoli1888 avatar Mar 16 '22 18:03 yoli1888

Are you sure the path is correct

vsatyamesc avatar Mar 19 '22 00:03 vsatyamesc

Same issue here..That function requires a folder named "characters/".. but what should we put in that folder ?

rokopi-byte avatar Aug 04 '22 09:08 rokopi-byte

Same issue here..That function requires a folder named "characters/".. but what should we put in that folder ?

I was reading the API documentation and couldn't find that function. Could you tell me where can I find it?

vsatyamesc avatar Aug 06 '22 02:08 vsatyamesc

I am trying to test the new function readtextlang() using Python3. Get error:

result = reader.readtextlang("test.png")

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/easyocr/easyocr.py", line 447, in readtextlang for filename in os.listdir(directory): FileNotFoundError: [Errno 2] No such file or directory: 'characters/'

Is there a workaround?

man why the hell are you using EasyOCR in python 3.9, switch to 3.8.2 it's more stable as some of the packages from EasyOCR aren't made for 3.9+

vsatyamesc avatar Aug 06 '22 02:08 vsatyamesc

I am trying to test the new function readtextlang() using Python3. Get error:

result = reader.readtextlang("test.png")

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/easyocr/easyocr.py", line 447, in readtextlang for filename in os.listdir(directory): FileNotFoundError: [Errno 2] No such file or directory: 'characters/'

Is there a workaround?

I was reading the the easyocr.py and found it. Could be because there is no Character folder there. Secondly, in Line 177, in easyocr.py, the attribute self.character hints to get the model of the characters. You can try putting those models there - https://www.jaided.ai/easyocr/modelhub/

vsatyamesc avatar Aug 06 '22 02:08 vsatyamesc