PyGTK3 'Namespace Gtk not available'

Similar to the 2-year-old thread Resolve "Namespace Gtk not available" on core18 I am trying to package an app ‘Gnofract 4D’ which uses pygtk3. Packaging is successful but when I run the snap I get

A fatal error occurred:
Namespace Gtk not available

Traceback (most recent call last):
File “/snap/gnofract4d/x5/bin/gnofract4d”, line 93, in
main(sys.argv[1:])
File “/snap/gnofract4d/x5/bin/gnofract4d”, line 39, in main
gtkmain(userConfig, opts)
File “/snap/gnofract4d/x5/bin/gnofract4d”, line 47, in gtkmain
gi.require_version(‘Gtk’, ‘3.0’)
File “/snap/gnofract4d/x5/usr/lib/python3/dist-packages/gi/init.py”, line 130, in require_version
raise ValueError(‘Namespace %s not available’ % namespace)
ValueError: Namespace Gtk not available

I assume I need some other package in stage-packages, but I’m not clear which one. My snapcraft.yaml is at https://github.com/fract4d/gnofract4d/blob/edyoung/snap/snap/snapcraft.yaml

Any assistance gratefully received!

You might need to setup GI_TYPELIB_PATH to something like $SNAP/usr/lib//girepository-1.0

@sergiusens till date I have been able to fix this with GI_TYPELIB_PATH but it’s not working at all here in denaro. Can you please help.

https://github.com/NickvisionApps/Denaro/actions/runs/6904206317

EDIT: fixed by forcing those env vars