EasyOCR: Model files won't download
Looks like there’s an issue with the server for the model files. Returns a 403 forbidden when attempting to download.
reader = easyocr.Reader(['en'], gpu = False)
File "/Users/travis/.local/share/virtualenvs/ocr-RN8nrvRp/lib/python3.8/site-packages/easyocr/easyocr.py", line 185, in __init__
urlretrieve(model_url['detector'][0] , DETECTOR_PATH)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 17 (2 by maintainers)
trying to fix. in the mean time, you can download manually from links on README
Thanks @rkcosmos!
One small thing: After redownloading the package as per your comment, I managed to download the models automatically, but I had to first install the requests library. Maybe the requests library should be automatically installed together with easyocr?
Traceback from my program:
Traceback (most recent call last): File “.\translate_manhua.py”, line 29, in <module> import easyocr File “D:\PythonEnvs\AutoManhuaTranslator\lib\site-packages\easyocr_init_.py”, line 1, in <module> from .easyocr import Reader File “D:\PythonEnvs\AutoManhuaTranslator\lib\site-packages\easyocr\easyocr.py”, line 5, in <module> from .recognition import get_recognizer, get_text File “D:\PythonEnvs\AutoManhuaTranslator\lib\site-packages\easyocr\recognition.py”, line 11, in <module> from .utils import CTCLabelConverter File “D:\PythonEnvs\AutoManhuaTranslator\lib\site-packages\easyocr\utils.py”, line 11, in <module> import requests ModuleNotFoundError: No module named ‘requests’