Opened 15 years ago
Closed 15 years ago
#898 closed defect (invalid)
WinGrass: r.out.xyz error
Reported by: | hellik | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.0 |
Component: | Raster | Version: | svn-releasebranch64 |
Keywords: | wingrass, raster, path | Cc: | |
CPU: | x86-32 | Platform: | MSWindows Vista |
Description
self-compild WinGrass r40741 in osgeo4w-stack
r.out.xyz --verbose input=elevation@PERMANENT output=C:\wd\mg\elev.xyz D2/3: filename = c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.out.xyz D2/3: set GIS_OPT_INPUT=elevation@PERMANENT D2/3: set GIS_OPT_OUTPUT=C:wdmgelev.xyz D2/3: set GIS_OPT_FS=| D3/3: win_spawn: args = C:\windows\system32\cmd.exe /c "C:/OSGeo4W/apps/msys/bin/sh c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.out.xyz @ARGS_PARSED@" c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.out.xyz: line 61: C:wdmgelev.xyz: Permission denied D1/3: ret = 1
there seems a path problem with the output-file.
Helmut
Change History (6)
follow-ups: 2 4 comment:1 by , 15 years ago
comment:2 by , 15 years ago
Replying to glynn:
Replying to hellik:
r.out.xyz --verbose input=elevation@PERMANENT output=C:\wd\mg\elev.xyzAre you running this via the MSys shell or via cmd.exe?
starting point was the wx-gui which didn't work and from which the original error message comes. then i've tried the command from the wx-gui in the msys-shell and the same error message comes up.
The MSys shell interprets backslashes, so they need to be escaped:
r.out.xyz --verbose input=elevation@PERMANENT output=C:\\wd\\mg\\elev.xyz
working in the msys-shell
or quoted:
r.out.xyz --verbose input=elevation@PERMANENT output='C:\wd\mg\elev.xyz'
working in the msys-shell
In most situations, you can use a forward slash instead:
r.out.xyz --verbose input=elevation@PERMANENT output=C:/wd/mg/elev.xyz
working in the msys-shell
OTOH, if you're running the command via cmd.exe (Windows' own command prompt), this would be a bug.
Helmut
follow-up: 5 comment:3 by , 15 years ago
Does this command work: (from the MSys terminal prompt)
r.stats -1gn elevation > C:\wd\mg\elev.xyz
?
also, I seem to recall that MS Windows generally prefers you use "double" quotes for quoting. (for msys it shouldn't matter, but for a DOS-in-a-box it could)
Hamish
comment:4 by , 15 years ago
Replying to glynn:
Replying to hellik:
r.out.xyz --verbose input=elevation@PERMANENT output=C:\wd\mg\elev.xyzAre you running this via the MSys shell or via cmd.exe?
also tested in the actual daily WinGrass-build (http://josef.fsv.cvut.cz/wingrass/grass64/) via cmd.exe which the original r.out.xyz --verbose input=elevation@PERMANENT output=C:\wd\mg\elev.xyz, but this also fails in the cmd.exe
Helmut
comment:5 by , 15 years ago
Replying to hamish:
Does this command work: (from the MSys terminal prompt)
r.stats -1gn elevation > C:\wd\mg\elev.xyz?
in the msys-shell
GRASS 6.4> r.stats -1gn elevation > C:\wd\mg\elev.xyz sh: C:wdmgelev.xyz: Permission denied
but
GRASS 6.4> r.stats -1gn elevation > "C:\wd\mg\elev.xyz" 100%
comment:6 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
msys GRASS 6.4> ls C:\Temp\* ls: C:Temp*: No such file or directory
the problem is that "\" has special meaning in a bourne shell, so when used litterally needs to be quoted. What you have done is quoted the w, m, and e characters in your filename and so the resulting string is C:wdmgelev.xyz, and apparently you don't have permission to write to your C:\ directory from that user account.
this should work without "quotes":
GRASS 6.4> r.stats -1gn elevation > C:\\wd\\mg\\elev.xyz
Hamish
Replying to hellik:
Are you running this via the MSys shell or via cmd.exe?
The MSys shell interprets backslashes, so they need to be escaped:
or quoted:
In most situations, you can use a forward slash instead:
OTOH, if you're running the command via cmd.exe (Windows' own command prompt), this would be a bug.