Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python3 Gtk program throws introspection typelib error

I am trying to convert a python2 GtK program, specifically Comix, to python3 Gtk program.

I have reached a point where the program throws an error:

ImportError: cannot import name Gobject, introspection typelib not found

The error is thrown at this point:

from gi.repository import Gobject

at bookmark.py. Anyway the program itself contains various linked py files and it's not that simple to present the structure.

The funny thing is that the same import command is executed in other modules in the same program with no problem. I am not sure what's the problem here.

Some solutions mentioned as to install gir1.2-gtk-3.0 is satisfied but to no avail. Also I installed my modules using pip and to compile them using --enable-introspection=yes seems an overkill to me. There should be another solution.

Any idea what's going on here and how to deal with it?

like image 411
Eypros Avatar asked Oct 18 '25 02:10

Eypros


1 Answers

module names are case sensitive, try this instead:

from gi.repository import GObject
like image 54
Jussi Kukkonen Avatar answered Oct 20 '25 15:10

Jussi Kukkonen