Opened 6 years ago
Closed 5 years ago
#3852 closed defect (fixed)
PyGRASS GridModule silently ignores when module has no output defined
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | PyGRASS | Version: | unspecified |
Keywords: | GridModule | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
For modules like G7:r.mapcalc PyGRASS GridModule class fails to work. No output is patched since the module has no output option defined.
from grass.pygrass.modules import Module from grass.pygrass.modules.grid import GridModule from grass.pygrass.utils import findmaps from grass.pygrass.gis import Mapset Module('g.region', n=1000, s=0, e=1000, w=0, res=1) grd = GridModule('r.mapcalc', width=250, height=250, overlap=0, processes=4, split=False, expression='out = 1') grd.run() print (findmaps('raster', 'out', mapset=str(Mapset())))
Prints
100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% 100% []
-> no raster map created. The GridModule should fail at least when no output option is defined.
Note:
See TracTickets
for help on using tickets.
See https://github.com/OSGeo/grass/pull/21