[GRASS-dev] [GRASS GIS] #289: error changing raster legend settings

#289: error changing raster legend settings
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------
Playing around with raster legend settings in wxGUI I got a following
error. Can't tell the exact way to reproduce.

{{{
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/gd
ialogs.py", line 408, in OnOK

self.parent.MapWindow.UpdateMap()
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 715, in UpdateMap

for img in self.GetOverlay():
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 592, in GetOverlay

if os.path.isfile(overlay.mapfile) and
os.path.getsize(overlay.mapfile):
   File "/usr/lib/python2.5/posixpath.py", line 208, in
isfile

st = os.stat(path)
TypeError
:
coercing to Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/gd
ialogs.py", line 408, in OnOK

self.parent.MapWindow.UpdateMap()
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 664, in UpdateMap

windres=windres)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 875, in Render

self._renderLayers(force, mapWindow, maps, masks, opacities)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 821, in _renderLayers

if not layer.Render():
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 189, in Render

del os.environ["GRASS_PNGFILE"]
   File "/usr/lib/python2.5/os.py", line 499, in __delitem__

del self.data[key]
KeyError
:
'GRASS_PNGFILE'
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/gd
ialogs.py", line 408, in OnOK

self.parent.MapWindow.UpdateMap()
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 664, in UpdateMap

windres=windres)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 875, in Render

self._renderLayers(force, mapWindow, maps, masks, opacities)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 821, in _renderLayers

if not layer.Render():
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 189, in Render

del os.environ["GRASS_PNGFILE"]
   File "/usr/lib/python2.5/os.py", line 499, in __delitem__

del self.data[key]
KeyError
:
'GRASS_PNGFILE'
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/gd
ialogs.py", line 408, in OnOK

self.parent.MapWindow.UpdateMap()
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 664, in UpdateMap

windres=windres)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 875, in Render

self._renderLayers(force, mapWindow, maps, masks, opacities)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 821, in _renderLayers

if not layer.Render():
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/re
nder.py", line 189, in Render

del os.environ["GRASS_PNGFILE"]
   File "/usr/lib/python2.5/os.py", line 499, in __delitem__

del self.data[key]
KeyError
:
'GRASS_PNGFILE'
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/289&gt;
GRASS GIS <http://grass.osgeo.org>

#289: setting 'at=' to anything crashes raster legend
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by msieczka):

  * summary: error changing raster legend settings => setting 'at=' to
              anything crashes raster legend

Comment:

Now I know what's the origin of the problem: setting the 'at=' option to
anything, e.g. '0,0'. The initial error is:

{{{
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/gd
ialogs.py", line 408, in OnOK

self.parent.MapWindow.UpdateMap()
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 715, in UpdateMap

for img in self.GetOverlay():
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 592, in GetOverlay

if os.path.isfile(overlay.mapfile) and
os.path.getsize(overlay.mapfile):
   File "/usr/lib/python2.5/posixpath.py", line 208, in
isfile

st = os.stat(path)
TypeError
:
coercing to Unicode: need string or buffer, NoneType found
}}}

The rest of the errors crops out when I press "OK" again.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/289#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#289: setting 'at=' to anything crashes raster legend
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by cmbarton):

  * status: new => closed
  * resolution: => fixed

Comment:

This was fixed in recent improvements to overlays. I just tested it and it
works fine.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/289#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>