You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed manga-ocr from the sources using python setup.py install --local. Now running manga_ocr I get the following error:
2023-07-18 22:51:12.411 | INFO | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
/home/user/.local/lib/python3.11/site-packages/transformers-4.31.0-py3.11.egg/transformers/models/vit/feature_extraction_vit.py:28: FutureWarning: The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use ViTImageProcessor instead.
warnings.warn(
2023-07-18 22:51:20.711 | INFO | manga_ocr.ocr:__init__:25 - Using CPU
Traceback (most recent call last):
File "/home/user/.local/bin/manga_ocr", line 33, in <module>
sys.exit(load_entry_point('manga-ocr==0.1.10', 'console_scripts', 'manga_ocr')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/manga_ocr-0.1.10-py3.11.egg/manga_ocr/__main__.py", line 7, in main
fire.Fire(run)
File "/home/user/.local/lib/python3.11/site-packages/fire-0.5.0-py3.11.egg/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/fire-0.5.0-py3.11.egg/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/fire-0.5.0-py3.11.egg/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/manga_ocr-0.1.10-py3.11.egg/manga_ocr/run.py", line 64, in run
mocr = MangaOcr(pretrained_model_name_or_path, force_cpu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/manga_ocr-0.1.10-py3.11.egg/manga_ocr/ocr.py", line 30, in __init__
self(example_path)
File "/home/user/.local/lib/python3.11/site-packages/manga_ocr-0.1.10-py3.11.egg/manga_ocr/ocr.py", line 36, in __call__
img = Image.open(img_or_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/Pillow-10.0.0-py3.11-linux-x86_64.egg/PIL/Image.py", line 3218, in open
fp = builtins.open(filename, "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/lib/python3.11/site-packages/manga_ocr-0.1.10-py3.11.egg/assets/example.jpg'
It seems like some missing example.jpg is causing a problem, I don't understand why.
The text was updated successfully, but these errors were encountered:
That's correct, the example.jpg is just for verification that it'w working fine on startup. Seems like it's not copied properly when installing from source. As a temporary fix, you can either copy the example.jpg to the expected location manually or comment out lines 27-30 in ocr.py
I've installed
manga-ocr
from the sources usingpython setup.py install --local
. Now runningmanga_ocr
I get the following error:It seems like some missing
example.jpg
is causing a problem, I don't understand why.The text was updated successfully, but these errors were encountered: