Snap Creation

Asked by ChrisOfBristol

I've got an application which I have made into a deb and is available on GetDeb. It is a simple Python application which uses GTK+ for the GUI. I want to make it available as a Snap. Using LXD 'snapcraft cleanbuild' creates a Snap which can be installed, but it fails to run, with an error related to GTK+.

I can't find a GTK+ forum and haven't had any knowledgeable suggestions on a Snap forum. Since Python and GTK+ are both fundamental parts of Ubuntu, I am beginning to suspect that Snap is still too experimental for it to be practical for anyone other than a real expert to create one. Am I right? If not where will I get competent help?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Are there any guides on YouTube?

Revision history for this message
ChrisOfBristol (chrisofbristol-deactivatedaccount) said :
#2

It's more a question of error fixing than learning how to construct it.

chris@Dell-DXP051:~/myapp$ myapp
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 890, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "myapp.py", line 125, in <module>
    from gi.repository import Gtk, GdkPixbuf
  File "/snap/myapp/x11/usr/lib/python3/dist-packages/gi/importer.py", line 127, in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name Gtk, introspection typelib not found
chris@Dell-DXP051:~/myapp$

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

According to https://www.linuxquestions.org/questions/mepis-64/python-and-gtk-cannot-find-typelib-4175533551/ you might be missing the gir1.2-gtk-3.0 package (at least for the second error).

Can you help with this problem?

Provide an answer of your own, or ask ChrisOfBristol for more information if necessary.

To post a message you must log in.