[GRASS-user] execGRASS("r.diversity"): [Error 3] Cannot find path specified \\.grass7\\r.li
Sandra MacFadyen
sandramf at live.co.za
Wed May 21 03:08:47 PDT 2014
Hi All,
I am new to GRASS and have a problem executing the r.diversity function via
R 3.1.0 and GRASS 7beta2:
When running the code:
# Calculate spectral diversity per band with windows size 5x5
execGRASS("r.diversity",flags="overwrite", parameters=list(input="name.1",
prefix="name_divers.1", alpha=0.5, size=5))
I get the following error:
Traceback (most recent call last):
File "C:/Program Files (x86)/GRASS GIS 7.0.0beta2/scripts/r.diversity.py",
line 272, in <module>
sys.exit(main())
File "C:/Program Files (x86)/GRASS GIS 7.0.0beta2/scripts/r.diversity.py",
line 116, in main
os.mkdir(rlidir)
WindowsError: [Error 3] The system cannot find the path specified:
'D:/Bands_processed1\\.grass7\\r.li'
Warning message:
running command '"C:/Program Files (x86)/GRASS GIS
7.0.0beta2/extrabin/python.exe" "C:/Program Files (x86)/GRASS GIS
7.0.0beta2/scripts/"r.diversity.py --overwrite input=s1993_tm5_rad.1
prefix=s1993_tm5_rad_divers.1 alpha=0.5 size=5' had status 1
I have loaded all the correct libraries and my GRASS environment variables
etc are set ok since I can successfully run other GRASS functions like
r.neighbors:
# Calculate spectral variance per band with windows size 5x5: WORKS FINE
execGRASS("r.neighbors",flags="overwrite", parameters=list(input="name.1",
output="name_var.1", method="variance", size=5))
Might it have something to do with the location of python.exe since I also
running ArcGIS so my environmental settings are PATH: C:\Python27\ArcGIS10.1
or maybe the r.li problems in GRASS 7
(http://osdir.com/ml/grass-user-gis/2014-02/msg00166.html)
FYI I am running the following:
GRASS GIS 7.0.0beta2 (code revision: 59858)
R 3.1.0 (+ Revolution R Enterprise 7.0)
Python 2.7.6 (+ IDLE 2.7.2)
ArcGIS 10.1
Windows 7 Enterprise (Service Pack 1) 64-bit (* but I'm running all above
software as 32-bit)
I would very much appreciate your help.
Thank you
Sandra
More information about the grass-user
mailing list