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

ModuleNotFoundError: No module named 'localization' (python 3.9) #233

Open
MikeJakubik opened this issue Jul 26, 2022 · 3 comments
Open

Comments

@MikeJakubik
Copy link

[root@fbsd /usr/ports/devel/gitinspector]# make install clean

===> Installing for gitinspector-py39-0.4.4_4
===> Checking if gitinspector-py39 is already installed
===> Registering installation for gitinspector-py39-0.4.4_4
Installing gitinspector-py39-0.4.4_4...
===> Cleaning for py39-setuptools-63.1.0
===> Cleaning for gitinspector-py39-0.4.4_4

[root@fbsd /usr/ports/devel/gitinspector]# cd

[root@fbsd ~]# gitinspector -h

Traceback (most recent call last):
File "/usr/local/bin/gitinspector", line 33, in
sys.exit(load_entry_point('gitinspector==0.4.4', 'console_scripts', 'gitinspector')())
File "/usr/local/bin/gitinspector", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
module = import_module(match.group('module'))
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/local/lib/python3.9/site-packages/gitinspector/gitinspector.py", line 24, in
import localization
ModuleNotFoundError: No module named 'localization'

@adam-waldenberg
Copy link
Member

Thanks. Looks like a breaking change of some sort in Python 3.9.

@foxyseta
Copy link

Same here. Any updates on this?

@davbeek
Copy link

davbeek commented Jan 13, 2023

Could be related to Python no longer supporting Python 2 as of 1 Jan 2020. Python 3.8 was released Oct 2019 and Python 3.9 in Oct 2020, so after the demise of Python 2.

Module gitinspector.localization uses Python 2 functionality in __translation__.install(True), where True is a Unicode flag used in Python 2. In Python 3, this flag is no longer present, so it should be __translation__.install(). This occurs in three places in localization.py (lines 71, 96 and 106).

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