Forums

BlockingIOError in EasyOCR

Hi, I am getting below BlockingIOError error while initiating EasyOCR

Error Log snippet

2023-05-03 02:30:49,077: Error running WSGI application
2023-05-03 02:30:49,090: BlockingIOError: [Errno 11] write could not complete without blocking
2023-05-03 02:30:49,091:   File "/var/www/pyconnectedbytes_pythonanywhere_com_wsgi.py", line 16, in <module>
2023-05-03 02:30:49,091:     from app import app as application  # noqa
2023-05-03 02:30:49,091: 
2023-05-03 02:30:49,091:   File "/home/pyconnectedbytes/mysite/app.py", line 20, in <module>
2023-05-03 02:30:49,091:     **easyocr_reader = easyocr.Reader(['en'])**
2023-05-03 02:30:49,091: 
2023-05-03 02:30:49,091:   File "/home/pyconnectedbytes/.virtualenvs/ocrflaskenv/lib/python3.9/site-packages/easyocr/easyocr.py", line 88, in __init__
2023-05-03 02:30:49,092:     detector_path = self.getDetectorPath(detect_network)
2023-05-03 02:30:49,094: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-05-03 02:30:49,094: ***************************************************

[edit by admin: formatting]

That suggests that the code that you're running is either trying to print out a very large amount of stuff, or that it's prompting for input. The best way to find out which would be to run the code in a console; then you can work out how to prevent it from doing whichever one it is.