#3896: d.legend: error when displaying raster legend
-------------------------+---------------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: Display | Version: git-releasebranch78
Keywords: d.legend | CPU: Unspecified
Platform: Unspecified |
-------------------------+---------------------------------
When calling G7:d.legend from terminal for a wx monitor, the legend is not
displayed and I get the following error in the terminal:
{{{
Traceback (most recent call last):
File "/usr/lib64/python3.7/site-packages/wx/core.py", line 2228, in
Notify
self.notify()
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/main.py", line 592, in watcher
self.mapFrm.GetMap().GetLayersFromCmdFile()
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/main.py", line 203, in GetLayersFromCmdFile
self._giface.GetMapDisplay().AddLegendRast(cmd=cmd)
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/frame.py", line 1244, in AddLegendRast
cmd, completed=(self.GetOptData, None, None))
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/forms.py", line 2925, in ParseCommand
get_dcmd=get_dcmd, layer=layer)
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/forms.py", line 550, in __init__
frame=self)
File "/home/veroandreo/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/forms.py", line 1454, in __init__
for layer in layers:
TypeError: iter() returned non-iterator of type 'LayerList'
}}}
If I use the main GUI though, all seems to work fine, no errors in the
console tab.
Replying to [comment:3 veroandreo]:
> The reported error with d.legend seems to be gone, but if I run the
commands in the following order:
>
> {{{
> d.mon wx0
> d.rast elevation
> d.barscale
> d.northarrow
> d.legend raster=elevation
> }}}
>
> d.legend makes the raster map disappear... I have to re-render to have
it back... that shouldn't be the expected behavior, IMO
I updated and recompiled 78 and also my system, but I still observe the
same behaviour. No idea.
Just checked on my system with a freshly compiled 7.8.dev: `d.northarrow`
makes the raster map disappear (using the example above). The other map
elements remain!