I am using gobject-introspection in python2.7 on ubuntu raring and I run into an import error while building some packages. I have isolated a minimal set of steps to replicate it:
Make a local directory structure:
gi: __init__.py overrides: __init__.py
Put the standard boilerplate
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__
in both
__init__.py
files.From the directory containing your local copy of
gi
, run the following:python -c "from gi import repository"
I get an error message that looks like:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/gi/repository/__init__.py", line 25, in <module> from ..importer import DynamicImporter File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 28, in <module> from .module import DynamicModule File "/usr/lib/python2.7/dist-packages/gi/module.py", line 37, in <module> from .overrides import registry ImportError: cannot import name registry
Any explanation? I can't find any decent documentation of the intended behavior because gobject-introspection seems like a very poorly documented project. Help is greatly appreciated!