Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model file not found #58

Closed
lodenrogue opened this issue Jul 8, 2020 · 5 comments
Closed

Model file not found #58

lodenrogue opened this issue Jul 8, 2020 · 5 comments

Comments

@lodenrogue
Copy link

Trying to run the example and I get this error:

>>> import easyocr
>>> reader = easyocr.Reader(['en'])
CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
Downloading detection model, please wait
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/myuser/.local/lib/python3.8/site-packages/easyocr/easyocr.py", line 168, in __init__
    urllib.request.urlretrieve(model_url['detector'][0] , DETECTOR_PATH)
  File "/usr/lib/python3.8/urllib/request.py", line 257, in urlretrieve
    tfp = open(filename, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '/home/myuser/.EasyOCR/model/craft_mlt_25k.pth'
@rkcosmos
Copy link
Contributor

rkcosmos commented Jul 8, 2020

Not sure what happened. You can also download files manually. See links on README.

@snoop2head
Copy link
Contributor

@rkcosmos
Actually, this happened to me also.

It is resolved pretty easily, by manually downloading file from google drive, placing on the directory that appeared on the console.

But will it be more convenient for allowing users to place models on project directory, instead of the root directory?

@rkcosmos
Copy link
Contributor

rkcosmos commented Jul 8, 2020

I was in project directory before I accept this PR #45 . It is the standard practice to store additional file in home directory because if program is installed system-wide. User without root-privilege can still download and save new model.

@jibaku
Copy link

jibaku commented Jul 8, 2020

I created the directory and the line worked:
mkdir -p /home/myuser/.EasyOCR/model

@rkcosmos
Copy link
Contributor

rkcosmos commented Jul 8, 2020

Thank you. I added a line to create that directory if not exist.

@rkcosmos rkcosmos closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants