sugarlabs / maze-activity

A simple maze game for the Sugar learning environment
GNU General Public License v3.0
1 stars 10 forks source link

Avoid pillow import errors #14

Closed quozl closed 7 years ago

quozl commented 7 years ago

On Debian systems since around 2009, and not yet fixed, the Jukebox and Maze activities fail to start, and logs contain;

Traceback (most recent call last):
  File "/usr/bin/sugar-activity", line 220, in <module>
    main()
  File "/usr/bin/sugar-activity", line 164, in main
    module = __import__(module_name)
  File "/usr/share/sugar/activities/Jukebox.activity/activity.py", line 51, in <module>
    from player import GstPlayer
  File "/usr/bin/player.py", line 14, in <module>
    from PIL import Image, ImageTk
ImportError: cannot import name ImageTk

Underlying cause is another package, pillow, which by providing a file /usr/bin/player.py overrides our import.

Rather than wait for the other packages to be fixed, just rename our module.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554906