[GRASS-dev] Info about MS windows add-ons packaging

Hi all,

I am trying to fix some issues related to my add-on “r.hazard.flood”, since Carolina is trying to use it on MSwindows without success. She pointed me out this error message:

On Thu, Aug 2, 2012 at 10:16 AM, Carolina Rogelis <c.rogeliz@gmail.com> wrote:

r.hazard.flood --overwrite --verbose map=ras_wshdtunj_5m@PERMANENT flood=flood mti=MTI
Traceback (most recent call last):
File “C:\Documents and Settings\rogel1\Application
Data\GRASS6\addons[r.hazard.flood.py](http://r.hazard.flood.py)”, line 121, in
sys.exit(main())
File “C:\Documents and Settings\rogel1\Application
Data\GRASS6\addons[r.hazard.flood.py](http://r.hazard.flood.py)”, line 100, in main
grass.run_command(‘r.clump’, input = ‘r_flood’, output =
‘r_clump’, flags = ‘-o’)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 189, in
run_command
ps = start_command(*args, **kwargs)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 167, in
start_command
args = make_command(prog, flags, overwrite, quiet,
verbose, **options)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 124, in
make_command
raise ScriptError(“‘-’ is not a valid flag”)
grass.script.core.ScriptError: “‘-’ is not a valid flag”
(Thu Aug 02 03:09:38 2012) Command finished (161 sec)

this is an old bug already fixed some months ago… problem is that, to my knowledge, addOns on windows are pre-compiled and packaged in order to be downloaded and ready-to-use. In other words, the bug is already fixed, but the package she is using is still bugged. Am I wrong? Would it be possible to package the latest version for windows users?

Thanks!


Dr. Margherita Di Leo

Hi again,

some more info: she is running GRASS 6.4.2 and windows XP.
What is not obvious to me, but maybe re-thinking about it, actually can make sense, is that add-ons for windows are not retrieved from the latest add-on version but from the version corresponding to the age of grass core, right? Sorry if this question could sound a silly one, but it’s pretty far from the logic used in Linux… So maybe she would solve the problem installing the night builds… ?

Thanks

On Thu, Aug 2, 2012 at 10:40 AM, Margherita Di Leo <dileomargherita@gmail.com> wrote:

Hi all,

I am trying to fix some issues related to my add-on “r.hazard.flood”, since Carolina is trying to use it on MSwindows without success. She pointed me out this error message:

On Thu, Aug 2, 2012 at 10:16 AM, Carolina Rogelis <c.rogeliz@gmail.com> wrote:

r.hazard.flood --overwrite --verbose map=ras_wshdtunj_5m@PERMANENT flood=flood mti=MTI
Traceback (most recent call last):
File “C:\Documents and Settings\rogel1\Application
Data\GRASS6\addons[r.hazard.flood.py](http://r.hazard.flood.py)”, line 121, in
sys.exit(main())
File “C:\Documents and Settings\rogel1\Application
Data\GRASS6\addons[r.hazard.flood.py](http://r.hazard.flood.py)”, line 100, in main
grass.run_command(‘r.clump’, input = ‘r_flood’, output =
‘r_clump’, flags = ‘-o’)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 189, in
run_command
ps = start_command(*args, **kwargs)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 167, in
start_command
args = make_command(prog, flags, overwrite, quiet,
verbose, **options)
File “C:\Program Files\GRASS
6.4.2\etc\python\grass\script\core.py”, line 124, in
make_command
raise ScriptError(“‘-’ is not a valid flag”)
grass.script.core.ScriptError: “‘-’ is not a valid flag”
(Thu Aug 02 03:09:38 2012) Command finished (161 sec)

this is an old bug already fixed some months ago… problem is that, to my knowledge, addOns on windows are pre-compiled and packaged in order to be downloaded and ready-to-use. In other words, the bug is already fixed, but the package she is using is still bugged. Am I wrong? Would it be possible to package the latest version for windows users?

Thanks!


Dr. Margherita Di Leo


Dr. Margherita Di Leo

Hi,

2012/8/2 Margherita Di Leo <dileomargherita@gmail.com>:

    grass.run_command('r.clump', input = 'r_flood', output =
'r_clump', flags = '-o')

flags = '-o' is wrong, should be 'overwrite = True'.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Ahoj Martin,

Thanks for replying. I fear I’ve not explained the problem well…

On Thu, Aug 2, 2012 at 10:44 PM, Martin Landa <landa.martin@gmail.com> wrote:

2012/8/2 Margherita Di Leo <dileomargherita@gmail.com>:

grass.run_command(‘r.clump’, input = ‘r_flood’, output =
‘r_clump’, flags = ‘-o’)

flags = ‘-o’ is wrong, should be ‘overwrite = True’.

In my add-on I have modified this line months ago:
https://trac.osgeo.org/grass/browser/grass-addons/grass6/raster/r.hazard.flood/r.hazard.flood.py#L114
Carolina installed the add-on just yesterday and got this error message… so my question is… how is this possible?

Thanks


Dr. Margherita Di Leo