[GRASS-user] Error in r.basin

Hello! I am trying to run r.basin for some analysis and it start promising but it end badly:
##########
r.basin.py map=dem_fill@harta prefix=a easting=491896.20 northing=659955.69 threshold=900
Removing raster
Raster map not found
nothing removed
SECTION 1a (of 5): Initiating Memory.
SECTION 1b (of 5): Determining Offmap Flow.
SECTION 2: A * Search.
SECTION 3: Accumulating Surface Flow with SFD.
SECTION 4: Watershed determination.
SECTION 5: Closing Maps.
Writing out only positive flow accumulation values.
Cells with a likely underestimate for flow accumulation can no longer be identified.
Traceback (most recent call last):
File “/usr/lib/grass64/scripts/r.basin.py”, line 427, in

sys.exit(main())
File “/usr/lib/grass64/scripts/r.basin.py”, line 133, in
main
grass.run_command(‘r.stream.extract’, elevation =
r_elevation, accumulation = r_accumulation, threshold = th,
d8cut = ‘infinity’, mexp = 0, stream_rast = r_stream_e,
stream_vect = v_stream_e, direction = r_drainage_e, flags
=‘-o’)
File “/usr/lib/grass64/etc/python/grass/script/core.py”,
line 186, in run_command
ps = start_command(*args, **kwargs)
File “/usr/lib/grass64/etc/python/grass/script/core.py”,
line 167, in start_command
args = make_command(prog, flags, overwrite, quiet,
verbose, **options)
File “/usr/lib/grass64/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”
(Mon Aug 1 21:19:09 2011) Command finished (2 sec)
########
I must mention that I have Grass64 installed from https://launchpad.net/~grass/+archive/grass-stable on Ubuntu Maverick and all dependencies needed ( I have managed to run separately almost every command but I have in total 22 basins)
Please could someone point me in the right direction ?
Bogdan Rosca

Hi,

2011/8/1 Rosca Bogdan <roscao@gmail.com>:

grass\.run\_command\(&#39;r\.stream\.extract&#39;, elevation =

r_elevation, accumulation = r_accumulation, threshold = th,
d8cut = 'infinity', mexp = 0, stream_rast = r_stream_e,
stream_vect = v_stream_e, direction = r_drainage_e, flags
='-o')

replace `flags = '-o'` with `overwrite = True`

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

On Mon, Aug 1, 2011 at 10:41 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2011/8/1 Rosca Bogdan <roscao@gmail.com>:

grass\.run\_command\(&#39;r\.stream\.extract&#39;, elevation =

r_elevation, accumulation = r_accumulation, threshold = th,
d8cut = 'infinity', mexp = 0, stream_rast = r_stream_e,
stream_vect = v_stream_e, direction = r_drainage_e, flags
='-o')

replace `flags = '-o'` with `overwrite = True`

There are probably more problems further down with e.g. flags = '-v'
in lines 249 and 254. Also, some of the printed messages should use
grass.message() to avoid spoiling the output written to stdout.

Markus M