#1692 closed defect (fixed)
calling a script within a script failing on Windows XP
Reported by: | hamish | Owned by: | martinl |
---|---|---|---|
Priority: | blocker | Milestone: | 6.4.3 |
Component: | Shell Scripts | Version: | 6.4.2 |
Keywords: | v.random.cover, wingrass, shell scripts | Cc: | grass-dev@… |
CPU: | x86-32 | Platform: | MSWindows XP |
Description
Hi,
We're trying to run v.random.cover(.sh) from grass6 addons on Windows XP using the standard 6.4.2-2 prebuilt binaries. That script calls v.report(.sh), but v.report fails. "g.parser has encountered a problem and needs to close." and v.report exits with a non-zero error code.
turning debug to level 1 I see "ret = 1" from the G_spawn() command.
Running the exact same v.report command from the msys command line works fine.
I'd note v.report sends data to both stderr and stdout, but that's all after the g.parser call.
I seem to recall a problem long ago where in wingrass a script calling another script didn't work.
Running which v.report
from the msys command prompt shows C:/Program Files/GRASS 6.4.2/scripts
, not the wrapper .bat file in $GISBASE/bin/. maybe it doesn't like $0 != what gets run on the second g.parser pass??
I'm not sure what to try to debug next.
thanks, Hamish
ps- we were also unable to download any of the addons directly with the gui extension tool, although the zip files seem ok on the server. Is it working for anyone with those 6.4.2-2 binaries?
Change History (25)
follow-up: 19 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Keywords: | v.report removed |
---|---|
Priority: | normal → critical |
Replying to hamish:
I seem to recall a problem long ago where in wingrass a script calling another script didn't work.
sort of #580, but not exactly.
I can confirm that it's calling any shell script from within another script, not just v.report. bumping priority
e.g. adding this to a script triggers it too:
g.manual -m dummy
Hamish
follow-up: 4 comment:3 by , 12 years ago
Replying to hamish:
ps- we were also unable to download any of the addons directly with the gui extension tool, although the zip files seem ok on the server. Is it working for anyone with those 6.4.2-2 binaries?
confirmed, unable to download
Helmut
comment:4 by , 12 years ago
Replying to hellik:
Replying to hamish:
ps- we were also unable to download any of the addons directly with the gui extension tool, although the zip files seem ok on the server. Is it working for anyone with those 6.4.2-2 binaries?
confirmed, unable to download
should be fixed now for 6.4.3svn. Martin
comment:5 by , 12 years ago
Priority: | critical → blocker |
---|
bumping to blocker. we need to fix this ASAP as it takes out a bunch of the scripts, including many of the v.db.* ones.
thanks, Hamish
follow-up: 7 comment:6 by , 12 years ago
we need to fix this ASAP as it takes out a bunch of the scripts, including many of the v.db.* ones.
anyone have ideas?
thanks, Hamish
follow-up: 9 comment:7 by , 12 years ago
Replying to hamish:
we need to fix this ASAP as it takes out a bunch of the scripts, including many of the v.db.* ones.
It seems to me that shell scripts don't work only if there are installed as AddOns. I think it's caused by the fact that shell script and bat script are placed in the same directory. It's result of your wish [1] which required extra hacking on g.extension side (it was the bad idea from POV) and moreover produced this blocker. It would be nice to simplify things and to complicated them when it's really not necessary. I hope that it was fixed in r53428 in G65. Please could you try the next snapshot, at least v.random.cover
seems to work for me.
Martin
http://lists.osgeo.org/pipermail/grass-dev/2011-December/056938.html
comment:8 by , 12 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
follow-ups: 10 15 comment:9 by , 12 years ago
Replying to martinl:
I hope that it was fixed in r53428 in G65. Please could you try the next snapshot, at least v.random.cover
seems to work for me.
tested here
System Info GRASS version: 6.5.svn GRASS SVN Revision: 53456 GIS Library Revision: 50936 (2012-02-25) GDAL/OGR: unknown Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1
v.random.cover --verbose cover=fields@PERMANENT cat=63 output=random_NP_cover n=500 raster=landcover.30m@PERMANENT C:\Users\XXXX\AppData\Roaming\GRASS6\addons/v.random.co ver: line 158: v.report: command not found ERROR: v.report failed
Helmut
follow-ups: 11 14 comment:10 by , 12 years ago
Replying to hellik:
v.random.cover --verbose cover=fields@PERMANENT cat=63 output=random_NP_cover n=500 raster=landcover.30m@PERMANENT C:\Users\XXXX\AppData\Roaming\GRASS6\addons/v.random.co ver: line 158: v.report: command not found ERROR: v.report failed
strange, tested with the same revision (both native and OSGeo4W)
v.random.cover
reinstalled using wxGUI Extension Manager- the module runs without problems
Later I will try another Windows machine...
follow-up: 12 comment:11 by , 12 years ago
Replying to martinl:
strange, tested with the same revision (both native and OSGeo4W)
v.random.cover
reinstalled using wxGUI Extension Manager- the module runs without problems
maybe unrelated but deinstalling via wxgui-g.extension-manager seems not to work, folder content after deinstalling
docs modules.xml v.random.cover v.random.cover.bat
follow-up: 13 comment:12 by , 12 years ago
comment:13 by , 12 years ago
comment:14 by , 12 years ago
Replying to martinl:
v.random.cover
reinstalled using wxGUI Extension Manager- the module runs without problems
unfortunately I can confirm this bug
v.random.cover cover=fields cat=63 output=cover n=500 raster=landcover.30m C:\Users\landa\AppData\Roaming\GRASS6\addons/v.random.cover: line 158: v.report: command not found ERROR: v.report failed
I am not sure how to fix it. Any idea? Martin
follow-up: 16 comment:15 by , 12 years ago
Replying to hellik:
please try next build (G65), I hope that r53512 will be better.
v.random.cover cover=fields cat=63 output=cover n=500 raster=landcover.30m --o WARNING: Vrstva 1 - žádná tabulka WARNING: Vektorová mapa <cover> již existuje a bude přepsána. Created <cover> with 500 random points ERROR: Vector map <> not found in current mapset
follow-up: 17 comment:16 by , 12 years ago
Replying to martinl:
Replying to hellik:
please try next build (G65), I hope that r53512 will be better.
System Info GRASS version: 6.5.svn GRASS SVN Revision: 53516 GIS Library Revision: 50936 (2012-02-25) GDAL/OGR: GDAL 1.9.2, released 2012/10/08 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
v.random.cover --verbose cover=fields@PERMANENT cat=63 output=random_NP_cover n=500 raster=landcover.30m@PERMANENT WARNING: Layer 1 - no table Created <random_NP_cover> with 500 random points DBMI-DBF driver error: SQL parser error: syntax error, unexpected $end processing '' in statement: Error in db_open_select_cursor() WARNING: 39 points outside current region were skipped Raster values from <landcover.30m@PERMANENT> uploaded to column <sampled> (Sun Oct 21 10:12:23 2012) Command finished (6 sec)
it seems the 'command not found'-issue is solved, more testing welcomed.
thanks Helmut
follow-up: 18 comment:17 by , 12 years ago
follow-ups: 20 22 comment:18 by , 12 years ago
follow-up: 21 comment:19 by , 12 years ago
comment:20 by , 12 years ago
Replying to martinl:
Replying to martinl:
backported to
relbr64
in r53519with the last winGRASS build, it seems to work. Testing welcomed...
confirmed, tested with
System Info GRASS version: 6.4.3svn GRASS SVN Revision: 53519 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: GDAL 1.9.2, released 2012/10/08 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
Helmut
comment:21 by , 12 years ago
Replying to martinl:
Replying to hamish:
oh yeah, one more minor problem: the help page in the extension .zip file was localized to the server's LANG setting :)
should be fixed in r53524
there is no manual-tab in the v.random.cover-wx-gui at all, tested with
System Info GRASS version: 6.4.3svn GRASS SVN Revision: 53519 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: GDAL 1.9.2, released 2012/10/08 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
Helmut
follow-up: 23 comment:22 by , 12 years ago
Replying to martinl:
Replying to martinl:
backported to
relbr64
in r53519with the last winGRASS build, it seems to work. Testing welcomed...
this ticket was about shell-scripts; maybe following it's worth for an extra ticket?:
there are some very nice python-based-script-addons for grass6.x, like the inter-dependent r.basin-, r.ipso-, r.wf-scripts (and others).
the pyhton addon-sscripts (r.basin.py, etc.) are stored in C:\Users\XXXX\AppData\Roaming\GRASS6\addons, whereas the related bat-files (r.basin.py.bat) are in C:\Users\XXXX\AppData\Roaming\GRASS6\addons\bin.
the content of the bat-files are e.g.
@"%GRASS_SH%" "%GISBASE%/scripts/r.basin.py" %*
in windows #!/usr/bin/env python isn't recognized, so "%GRASS_SH%" should be changed to "%GRASS_PYTHON%"
but changing this manually, r.basin calling r.ipso/r.wf isn't really working.
AFAIK python addons-scripts aren't at the moment officially supported in grass6.x (working out of the box in linux, but not in windows), although it would be nice if such peculiar scripts would also be available in windows.
Helmut
follow-up: 25 comment:23 by , 12 years ago
Replying to hellik:
this ticket was about shell-scripts; maybe following it's worth for an extra ticket?:
yes, please fill extra tickets. The reported bug seems to be fixed, so I am closing this ticket. Please feel free to reopen if needed. For other issues please fill separated bug reports. The key point is that another blocker is fixed and we are closer to 6.4.3RC1.
comment:24 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:25 by , 12 years ago
Replying to martinl:
Replying to hellik:
this ticket was about shell-scripts; maybe following it's worth for an extra ticket?:
yes, please fill extra tickets. The reported bug seems to be fixed, so I am closing this ticket.
done:
Ticket #1768 wingrass6.x: python addon scripts aren't working Ticket #1769 wingrass6.x: addons' manual tab not there in wxgui
Helmut
oh yeah, one more minor problem: the help page in the extension .zip file was localized to the server's LANG setting :)