Opened 11 years ago

Closed 11 years ago

#2135 closed defect (fixed)

wxGUI: failed to show legend when PIL is missing

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: wxGUI Version: unspecified
Keywords: legend, PIL Cc:
CPU: x86-64 Platform: Linux

Description

It's not possible to show legend when PIL package is not available, see traceback bellow

 File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/mapdisp/frame.py", line 187, in <lambda>
    overlay.overlayChanged.connect(lambda: self.MapWindow2D.UpdateMap(render=False, renderVector=False))
  File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/mapwin/buffered.py", line 720, in UpdateMap
    for img in self.GetOverlay():
  File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/mapwin/buffered.py", line 601, in GetOverlay
    img = utils.autoCropImageFromFile(overlay.mapfile)
  File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/core/utils.py", line 1103, in autoCropImageFromFile
    from PIL import Image

Change History (5)

comment:1 by annakrat, 11 years ago

I added special handling of missing PIL in r58256 (with advice to install it), however we should decide if PIL is a official requirement for wxGUI. Now it's used for cropping overlays (legend and so) so that you can move more decorations easily.

in reply to:  1 ; comment:2 by hamish, 11 years ago

Replying to annakrat:

however we should decide if PIL is a official requirement for wxGUI.Now it's used for cropping overlays (legend and so) so that you can move more decorations easily.

fwiw it is already "encouraged", since if PIL is there the wxGUI PsMap and Animation tools like to use it too.

Hamish

in reply to:  2 ; comment:3 by annakrat, 11 years ago

Replying to hamish:

Replying to annakrat:

however we should decide if PIL is a official requirement for wxGUI.Now it's used for cropping overlays (legend and so) so that you can move more decorations easily.

fwiw it is already "encouraged", since if PIL is there the wxGUI PsMap and Animation tools like to use it too.

Animation tool uses PIL for the same reason as map Window now - trim legend so that you can move it around the screen easily.

Can we close this?

in reply to:  3 comment:4 by martinl, 11 years ago

Replying to annakrat:

Can we close this?

For me - yes.

comment:5 by annakrat, 11 years ago

Resolution: fixed
Status: newclosed

I also updated REQUIREMENTS.html and gui/wxPython/README (r58282).

Note: See TracTickets for help on using tickets.