Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapcraft 2.26 no longer builds working snap #20

Closed
tttppp opened this issue Feb 15, 2017 · 3 comments
Closed

Snapcraft 2.26 no longer builds working snap #20

tttppp opened this issue Feb 15, 2017 · 3 comments

Comments

@tttppp
Copy link
Owner

tttppp commented Feb 15, 2017

For some reason using snapcraft 2.26 does not build a working snap (or this might be a coincidental change - it might be a latest version of something else). When trying to load an image I get the following exception:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/snap/mountain-tapir/4/usr/lib/python2.7/lib-tk/Tkinter.py", line 1540, in __call__
    return self.func(*args)
  File "mountain_tapir/controller.py", line 106, in <lambda>
    canvas.bind('<Button-1>',lambda e, c=canvas, r=region: self.clicked(c, r))
  File "mountain_tapir/controller.py", line 147, in clicked
    self.recentImages.addImage(imageFile, self.selectPlaceTool)
  File "mountain_tapir/recent_images.py", line 57, in addImage
    imageFile.makeImage('thumbnail', (THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT), imageCellCanvas)
  File "mountain_tapir/image_file.py", line 48, in makeImage
    photoImage = ImageTk.PhotoImage(image)
  File "/snap/mountain-tapir/4/lib/python2.7/site-packages/PIL/ImageTk.py", line 115, in __init__
    self.paste(image)
  File "/snap/mountain-tapir/4/lib/python2.7/site-packages/PIL/ImageTk.py", line 180, in paste
    from PIL import _imagingtk
ImportError: cannot import name _imagingtk

This suggests that something is wrong with PIL. Comparing the prime directory from a working snap (v1.0.1) with a fresh build of the same code I get lots of differences. In particular:

  • Changes to the handling of the desktop file including a change to the exec line and removal of the desktop line from the snap.yaml file.
  • Missing python scripts from $SNAP/bin (including files named gifmaker.py and painter.py).
  • Lots of changes to $SNAP/lib/python2.7/site-packages/PIL
  • Pillow 4.0.0 replaced by Pillow 2.9.0.
  • Missing olefile and olefile-0.44.dist-info directories.
  • setuptools.34.1.1 replaced by setuptools-34.2.0.
  • Changes to the mesa copyright (and maybe other files too?)
@tttppp
Copy link
Owner Author

tttppp commented Feb 15, 2017

The change to snap.yaml is fine (it's actually an improvement): https://bugs.launchpad.net/snapcraft/+bug/1656487

@tttppp
Copy link
Owner Author

tttppp commented Feb 15, 2017

Also the change in the desktop file from mountain-tapir.mountain-tapir to mountain-tapir is an improvement: https://bugs.launchpad.net/snapcraft/+bug/1658123

@tttppp tttppp closed this as completed in 2974f84 Feb 15, 2017
@tttppp
Copy link
Owner Author

tttppp commented Feb 15, 2017

I think there were a couple of issues (see the commit for details):

  1. The version of PIL being brought in had changed (I think previously a bug was causing mountain-tapir to work).
  2. The app command needed to point to the wrapper.

The new version of snapcraft seems to have also fixed the integration with the application launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant