Python 3 plugin sanity checking

Barry Warsaw barry at
Fri Oct 28 22:27:23 UTC 2016

I've started to snap up GNU Mailman 3.

During an earlier iteration I forgot to add usr/lib to the snap part

    plugin: python
      - bin
      - lib
      - usr/lib  <------ this

If you install and run the resulting snap (e.g. mailman-core.mailman --version)
Python will core dump because the stdlib, and in particular the 'encodings'
module didn't get installed.

$ sudo snap install --devmode ~/projects/mailman/snap/*.snap
mailman-core 3.1b1 installed

$ mailman-core.mailman --version
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f77264e4700 (most recent call first):
Aborted (core dumped)

Wouldn't it make sense for the Python 3 plugin to either automatically include
the stdlib (e.g. usr/lib) or complain loudly if it's not included explicitly
in the resulting snap?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Snapcraft mailing list