Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3788 closed defect (fixed)

Bug for flag `-n` in r.lake.series

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: normal Milestone:
Component: Addons Version: unspecified
Keywords: r.lake.series Cc: wenzeslaus
CPU: Unspecified Platform: Unspecified

Description

Panos (pmav99) spotted a bug in line https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.lake.series/r.lake.series.py#L193: it will never be True because line https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.lake.series/r.lake.series.py#L188 redefines flag to be an empty string.

ps- @Vaclav, I can fix this since I can commit to SVN.

Change History (5)

comment:1 by neteler, 5 years ago

Please fix it, Nikos, thanks

comment:2 by Nikos Alexandris, 5 years ago

Resolution: fixed
Status: newclosed

Fixed with revision 74324.

comment:3 by baharmon, 5 years ago

I am getting an error for flag -n in r.lake.series when freshly installed. Here is an example:

r.lake.series elevation=elev_lid792_1m@PERMANENT output=flood start_water_level=105 end_water_level=116 water_level_step=1 coordinates=638899.501992,220010.458167
Traceback (most recent call last):
  File
"/home/baharmon/.grass7/addons/scripts/r.lake.series", line
225, in <module>
    sys.exit(main())
  File
"/home/baharmon/.grass7/addons/scripts/r.lake.series", line
193, in main
    flags += 'n'
TypeError: unsupported operand type(s) for +=: 'dict' and
'str'
Last edited 5 years ago by baharmon (previous) (diff)

comment:4 by Nikos Alexandris, 5 years ago

I admit, I had seen two other "weird" lines in the script:

if 'n' in flags:
    flags += 'n'

but due to work overload lately, I forgot to fix'em. After https://trac.osgeo.org/grass/changeset/74431, the module works for me, from inside the nc_basic_spm_grass7 Location:

r.lake.series elevation=elevation_int output=r.lake.series.output start_water_level=150 end_water_level=
156 water_level_step=1 coordinates=637500.000000,221750.000000 --o

produces the following valid raster maps

r.lake.series.output_150.0
r.lake.series.output_151.0
r.lake.series.output_152.0
r.lake.series.output_153.0
r.lake.series.output_154.0
r.lake.series.output_155.0
r.lake.series.output_156.0

Try again please.

ps1- It seems that t.list strds is broken here. Will verify.

ps2- This is why automatic tests are a necessity to run after each and every commit.

comment:5 by Nikos Alexandris, 5 years ago

Note: See TracTickets for help on using tickets.