OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
845 stars 307 forks source link

[Bug] Map is not added to the map window after running analysis #4166

Closed lindakarlovska closed 2 months ago

lindakarlovska commented 2 months ago

Describe the bug

Map is not added to the map window after running some tool generating map output.

To reproduce

I have run the r.watershed analysis and the analysis run successfully. However, after finishing the script flow I got this error in the Console:


Traceback (most recent call last):
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/gconsole.py", line 830, in OnCmdDone

self.mapCreated.emit(
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 232, in
emit

dispatcher.send(signal=self, *args, **kwargs)
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 340, in
send

response = robustapply.robustApply(
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 90, in
robustApply

return receiver(*arguments, **named)
TypeError
:
TaskFrame.OnMapCreated() got an unexpected keyword argument
'add'
-->

Expected behavior

Should add a new map to a map window.

System description

I have not observed it thoroughly, but it seems similar to https://github.com/OSGeo/grass/issues/4124. Please @echoix , could you look at it?

echoix commented 2 months ago

The commit that changed lambdas that was problematic for #4124 has been reverted since.

veroandreo commented 2 months ago

I can confirm this. Trying to run a tool from the GUI, in this case r.neighbors, yields the following in the console, and no map displayed.

Traceback (most recent call last):
  File "/home/vandreo/software/grass-dev/dist.x86_64-pc-
linux-gnu/gui/wxpython/core/gconsole.py", line 830, in
OnCmdDone

self.mapCreated.emit(
  File "/home/vandreo/software/grass-dev/dist.x86_64-pc-
linux-gnu/etc/python/grass/pydispatch/signal.py", line 232,
in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "/home/vandreo/software/grass-dev/dist.x86_64-pc-
linux-gnu/etc/python/grass/pydispatch/dispatcher.py", line
340, in send

response = robustapply.robustApply(

  File "/home/vandreo/software/grass-dev/dist.x86_64-pc-
linux-gnu/etc/python/grass/pydispatch/robustapply.py", line
90, in robustApply

return receiver(*arguments, **named)

TypeError
:
TaskFrame.OnMapCreated() got an unexpected keyword argument
'add'

System info

GRASS version: 8.5.0dev                                                         
Code revision: c53c938bac                                                       
Build date: 2024-08-04                                                          
Build platform: x86_64-pc-linux-gnu                                             
GDAL: 3.7.1                                                                     
PROJ: 9.2.1                                                                     
GEOS: 3.12.0                                                                    
SQLite: 3.42.0                                                                  
Python: 3.11.6                                                                  
wxPython: 4.2.1                                                                 
Platform: Linux-6.5.0-44-generic-x86_64-with-glibc2.38                          
nilason commented 2 months ago

https://github.com/OSGeo/grass/commit/c88fc0f73cb1d3f9266b5469831a1d6822b3130e is the culprit.

nilason commented 2 months ago

c88fc0f is the culprit.

(I need not to stress the importance of testing the GUI after similar changes in the future).