[GRASS-user] v.class.mlR Error

Moritz Lennert mlennert at club.worldonline.be
Wed Jun 6 00:05:29 PDT 2018


On 04/06/18 15:42, Jamille Haarloo wrote:
> It did not work out from another station, but I tried today from the 
> same computer.
> I first reinstalled the module.
> This is the command output:
> 
> 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 <http://v.class.mlR.py>", line 632, in <module>
>      main()
>    File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
> pts/v.class.mlR.py <http://v.class.mlR.py>", line 569, 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

I still have the feeling that the system cannot find Rscript.

Can you open the GRASS terminal window and type 'Rscript' to see if it 
can be found ?

Just to be sure: you do have R installed ?

> Error in atexit._run_exitfuncs:
> Traceback (most recent call last):
>    File "C:\Program Files\GRASS GIS
> 7.4.0\Python27\lib\atexit.py", line 24, in _run_exitfuncs
>      func(*targs, **kargs)
>    File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
> pts/v.class.mlR.py <http://v.class.mlR.py>", line 236, in cleanup
>      gscript.try_remove(model_output_csv)
> NameError: global name 'model_output_csv' is not defined
> Error in sys.exitfunc:
> Traceback (most recent call last):
>    File "C:\Program Files\GRASS GIS
> 7.4.0\Python27\lib\atexit.py", line 24, in _run_exitfuncs
>      func(*targs, **kargs)
>    File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
> pts/v.class.mlR.py <http://v.class.mlR.py>", line 236, in cleanup
>      gscript.try_remove(model_output_csv)
> NameError: global name 'model_output_csv' is not defined

This NameError is a consequence of the earlier error, but anyhow I just 
corrected it in r72773.

Moritz


More information about the grass-user mailing list