[GRASS-user] v.class.mlR Error

Helmut Kudrnovsky hellik at web.de
Thu May 31 13:43:58 PDT 2018


>This said, if I understand the OP's message, the issue was in finding
>Rscript in MS Windows.

looking at the original report:

-------------------
[...]
Running R now. Following output is R output.
Traceback (most recent call last):
  File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
pts/v.class.mlR.py", line 633, in <module>
    main()
  File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
pts/v.class.mlR.py", line 570, in main
    subprocess.check_call(['Rscript', r_commands],
stderr=subprocess.STDOUT, )
  File "C:\Program Files\GRASS GIS
7.4.0\Python27\lib\subprocess.py", line 537, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Program Files\GRASS GIS
7.4.0\Python27\lib\subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Program Files\GRASS GIS
7.4.0\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "C:\Program Files\GRASS GIS
7.4.0\Python27\lib\subprocess.py", line 948, in
_execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file
specified
-------------------

yes, it seems it's the issue finding the Rscript.

>Do you have any recommendation on this ? 

the tempfile and the path to it has to be properly build, acknowledging to
operating system characteristics; and, as in this case, considering the
peculiarity of involved 3rd party software.

e.g. 

# path in windows

D:\temp\vclassr

vs.

# path in R in windows

D:/temp/vclassr

but don't be confused [1] [2], windows operating system also understands
D:/temp/vclassr, e.g. you can cd in the command line or open it in the
windows explorer ;-D ...

[1]
https://bytes.com/topic/python/answers/23123-when-did-windows-start-accepting-forward-slash-path-separator

[2]
https://www.howtogeek.com/181774/why-windows-uses-backslashes-and-everything-else-uses-forward-slashes/




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


More information about the grass-user mailing list