#58122 closed defect (fixed)
gexiv2: Python module fails to load
Reported by: | mklein-de (Michael Klein) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ctreleaven (Craig Treleaven) | |
Port: | gexiv2 |
Description
The python module of gexiv2 fails to load both in python 2.7 and python 3.6 with an AttributeError:
$ python2.7 -c "from gi.repository import GExiv2" Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/importer.py", line 146, in load_module dynamic_module = load_overrides(introspection_module) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/overrides/__init__.py", line 125, in load_overrides override_mod = importlib.import_module(override_package_name) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/overrides/GExiv2.py", line 36, in <module> class Metadata(GExiv2.Metadata): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/module.py", line 138, in __getattr__ self.__name__, name)) AttributeError: 'gi.repository.GExiv2' object has no attribute 'Metadata'
$ python3.6 -c "from gi.repository import GExiv2" Traceback (most recent call last): File "<string>", line 1, in <module> File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 656, in _load_unlocked File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gi/importer.py", line 146, in load_module dynamic_module = load_overrides(introspection_module) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gi/overrides/__init__.py", line 125, in load_overrides override_mod = importlib.import_module(override_package_name) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gi/overrides/GExiv2.py", line 36, in <module> class Metadata(GExiv2.Metadata): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gi/module.py", line 138, in __getattr__ self.__name__, name)) AttributeError: 'gi.repository.GExiv2' object has no attribute 'Metadata'
$ port installed gexiv2 The following ports are currently installed: gexiv2 @0.10.9_1+python27+python36 (active)
Change History (9)
comment:1 Changed 6 years ago by jmroot (Joshua Root)
Cc: | devans@… removed |
---|---|
Owner: | set to dbevans |
Status: | new → assigned |
comment:2 Changed 3 years ago by ctreleaven (Craig Treleaven)
comment:3 Changed 3 years ago by kencu (Ken)
That looks like a temporary path used during the build/test phase that never was overwritted when installed.
comment:4 Changed 3 years ago by kencu (Ken)
If it is related to gobject-introspection, and it looks like it is, there have been many changes in that setup/PG/software over the past year. You might try rebuilding gexiv2 and/or gramps (or both, in that order) from source and see what happens.
comment:5 Changed 3 years ago by ctreleaven (Craig Treleaven)
Cc: | ctreleaven added |
---|
comment:6 Changed 3 years ago by ctreleaven (Craig Treleaven)
I have rebuilt gexiv2 with no improvement. I'll try rebuilding gramps but it seems unlikely to fix the problem. I'll also try forcing a local build of gobject-introspection. (BTW, I migrated to this machine, with a new OS, in February 2021.)
Weirdly, I installed gramps on another older machine and it does not exhibit these problems.
There seem to have been a variety of tickets over the past half year (?) concerning gobject-introspection and g-ir-scanner in particular. Is there one that has a good summary of the problems and the current state of our fixes?
comment:7 Changed 3 years ago by kencu (Ken)
Not really. It's a collection of python code with linker assumptions done by people who don't primarily use macOS.
Even trying to debug it is a huge headache.
comment:8 Changed 3 years ago by evanmiller (Evan Miller)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I am seeing this error with Gramps 5.1.3:
On my system, the relevant library is at:
so it appears that it is trying to load from the wrong location, perhaps.