Hello!
I am trying to snap my python application which uses PyGObject for GTK3.
An older, working version (tkinter) of the app can be found here: https://snapcraft.io/ocrmypdfgui
I wrote a newer and more modern version that uses GTK3. Somehow I cannot get snapcraft to yield a running snap (build process works).
All code is here:
My snapcraft.yaml:
The snap crashes on run with:
alexander@alexander-XPS-13-9350:~/Programming/git/ocrmypdfgui$ ocrmypdfgui
** (main.py:76983): WARNING **: 23:40:23.003: Failed to load shared library ‘libgtk-3.so.0’ referenced by the typelib: /snap/ocrmypdfgui/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_font_description_set_variations Traceback (most recent call last): File “/snap/ocrmypdfgui/x1/lib/python3.6/site-packages/ocrmypdfgui/main.py”, line 3, in from ocrmypdfgui.gui import run File “/snap/ocrmypdfgui/x1/lib/python3.6/site-packages/ocrmypdfgui/gui.py”, line 6, in from ocrmypdfgui.ocr import start_job File “/snap/ocrmypdfgui/x1/lib/python3.6/site-packages/ocrmypdfgui/ocr.py”, line 12, in from gi.repository import Gtk, Gio, GLib File “”, line 971, in _find_and_load File “”, line 955, in _find_and_load_unlocked File “”, line 656, in _load_unlocked File “”, line 626, in _load_backward_compatible File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/importer.py”, line 146, in load_module dynamic_module = load_overrides(introspection_module) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/overrides/init.py”, line 118, in load_overrides override_mod = importlib.import_module(override_package_name) File “/snap/ocrmypdfgui/x1/usr/lib/python3.6/importlib/init.py”, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/overrides/Gtk.py”, line 136, in class Widget(Gtk.Widget): File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/module.py”, line 176, in getattr interfaces = tuple(interface for interface in get_interfaces_for_object(info) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/module.py”, line 102, in get_interfaces_for_object interfaces.append(getattr(module, name)) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/overrides/init.py”, line 32, in getattr return getattr(self.introspection_module, name) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/module.py”, line 215, in getattr wrapper = metaclass(name, bases, dict) File “/snap/ocrmypdfgui/x1/gnome-platform/usr/lib/python3.6/site-packages/gi/types.py”, line 250, in init register_interface_info(cls.info.get_g_type()) TypeError: must be an interface
Not sure how to fix this. Any ideas would be very appreciated.