gi.repository search path

I'd like to use PyCharm (on Debian GNU/Linux) to develop a gedit plugin, but there's a bit of a problem with it. It can't resolve `from gi.repository import Gedit` or create stubs for the binary module. I'm pretty sure this is because gedit's gir and typelib files are in gedit-specific directories instead of the system gir and typelib directories. I've tried adding `export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/gedit/girepository-1.0` to `` (and confirmed that it's set correctly in a PyCharm terminal) but it doesn't fix the problem.

I also tried symlinking gedit's typelib and gir files to the system directories, but that didn't help either.

Both attempted solutions also cause an exception ending in

`File "/usr/lib/python3/dist-packages/gi/overrides/", line 206, in override
    assert g_type != TYPE_NONE`

if I try to import Gedit into a python3 console, so there seems to be some other issue with this module preventing anything other than gedit itself from being able to read it, but seeing as gedit is working AFAICT, its developers might not consider that to be a bug.

Anyone know how to fix this?

Please sign in to leave a comment.