zyddnys / manga-image-translator

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/
https://cotrans.touhou.ai/
GNU General Public License v3.0
4.59k stars 473 forks source link

[Bug]: ModuleNotFoundError: No module named 'langcodes' #629

Closed 72Joe72 closed 1 month ago

72Joe72 commented 1 month ago

Issue

I've been wanting to use the translator again for a long time and unfortunately I've discovered that it no longer works :(

I have already tried to reinstall the script and update the Python packages but I always get the same error message

Everything was working normally a month or two ago

Command Line Arguments

py -m manga_translator --mode demo -v --translator=google -l ENG -i E:\TEST.jpeg

Console logs

E:\---\manga-image-translator>py -m manga_translator --mode demo -v --translator=google -l ENG -i E:\TEST.jpeg
Traceback (most recent call last):
  File "C:\---\Python\Python312\lib\runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\---\Python\Python312\lib\runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\---\Python\Python312\lib\runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "E:\---\manga-image-translator\manga_translator\__init__.py", line 7, in <module>
    from .manga_translator import *
  File "E:\---\manga-image-translator\manga_translator\manga_translator.py", line 8, in <module>
    import langcodes
ModuleNotFoundError: No module named 'langcodes'
zyddnys commented 1 month ago

just install this package pip install langcodes