<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><br>
</p>
<div class="moz-cite-prefix">On 17/07/2023 16:56, Jamille Haarloo
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADiROyeQqe=8DpmVoFwnu46Mp8P9x0TFXu8bM7=0fAxs729R_A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Thank you Micha,
<div><br>
</div>
<div>This was the msg following "C:\Users\haarlooj\Documents>
sessionInfo()": <br>
<span style="background-color:rgb(252,229,205)">'sessionInfo'
is not recognized as an internal or external command,<br>
operable program or batch file.</span><br>
</div>
<div><br>
</div>
</div>
</blockquote>
<p>What you need to try is:</p>
<p><br>
</p>
<p><font size="5" face="monospace">Rscript -e "sessionInfo()"</font></p>
<p><br>
</p>
<p>The GRASS module <font face="monospace">v.class.mlR</font>
needs to be able to "find" the Rscript executable in order to run.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CADiROyeQqe=8DpmVoFwnu46Mp8P9x0TFXu8bM7=0fAxs729R_A@mail.gmail.com">
<div dir="ltr">
<div>I looked for the location and found this as location of R: <br>
C:\Program Files\R\R-4.3.0\bin\x64<br>
</div>
<div>Location for Rstudio:<br>
C:\Program Files\RStudio<br>
</div>
<div><br>
</div>
<div>Is it correct that I need to change the paths? What is the
best method?</div>
<div><br>
</div>
<div>Best,</div>
<div>Jamille</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Jul 15, 2023 at
9:17 AM Micha Silver <<a href="mailto:tsvibar@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">tsvibar@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
Jamille<br>
<br>
<br>
On 15/07/2023 2:04, Jamille Haarloo wrote:<br>
> Dear all,<br>
><br>
> What was the solution to this error? I recently got a
similar error <br>
> from the same module v.class.mlR. I am using GRASS GIS
8.2.1 on <br>
> Windows 10.<br>
><br>
<br>
The previous post was in reference to MacOS. Can you check on
your <br>
system that the Rscript executable is available from the GRASS
command <br>
window? i.e.<br>
<br>
- start grass (even without the GUI)<br>
<br>
- go to the command shell<br>
<br>
- run Rscript -e "sessionInfo()"<br>
<br>
<br>
This will identify if the problem is due to missing PATH in
the env <br>
variables.<br>
<br>
<br>
<br>
> Best,<br>
> Jamille<br>
><br>
> ----<br>
> Running R now. Following output is R output.<br>
> Traceback (most recent call last):<br>
> File
"C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri<br>
> pts\<a href="http://v.class.mlR.py" rel="noreferrer"
target="_blank" moz-do-not-send="true">v.class.mlR.py</a>
<<a href="http://v.class.mlR.py" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://v.class.mlR.py</a>>",
line 977, in <module><br>
> main()<br>
> File
"C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri<br>
> pts\<a href="http://v.class.mlR.py" rel="noreferrer"
target="_blank" moz-do-not-send="true">v.class.mlR.py</a>
<<a href="http://v.class.mlR.py" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://v.class.mlR.py</a>>",
line 908, in main<br>
> subprocess.check_call(<br>
> File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line<br>
> 368, in check_call<br>
> retcode = call(*popenargs, **kwargs)<br>
> File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line<br>
> 349, in call<br>
> with Popen(*popenargs, **kwargs) as p:<br>
> File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line<br>
> 951, in __init__<br>
> self._execute_child(args, executable, preexec_fn,<br>
> close_fds,<br>
> File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line<br>
> 1420, in _execute_child<br>
> hp, ht, pid, tid = _winapi.CreateProcess(executable,<br>
> args,<br>
> FileNotFoundError: [WinError 2] The system cannot find
the<br>
> file specified<br>
><br>
><br>
> On Sun, Feb 20, 2022 at 8:24 AM Nicklas Larsson via
grass-user <br>
> <<a href="mailto:grass-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>>
wrote:<br>
><br>
> Daniel,<br>
><br>
> I assume you use the official GRASS app bundle for
mac. If you are<br>
> not using the final 8.0.0 version, but one of the
release<br>
> candidates, I'd suggest you download the latest.
There are changes<br>
> in the startup script in the final version that
relate to PATH<br>
> issues like this.<br>
><br>
><br>
><br>
> Best,<br>
> Nicklas<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On Sunday, 20 February 2022, 01:55:28 CET, Daniel
Kozar via<br>
> grass-user <<a
href="mailto:grass-user@lists.osgeo.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>>
wrote:<br>
><br>
><br>
><br>
><br>
><br>
> Hi Micha,<br>
><br>
> Thanks for the reply. I ran the script lines you sent
both in the<br>
> terminal as well as a GRASS session. Rscript is
recognized in the<br>
> terminal command but not in the GRASS 8.0 command.
Since GRASS 8.0<br>
> did not recognize Rscript I tried making a symbolic
link for<br>
> "Rscript" to the full path: /usr/local/bin/Rscript.
This still<br>
> doesn't recognize the command and I'm unsure how else
to work<br>
> around it.<br>
><br>
> Any Mac aficionados reading this - do you have an
idea to resolve<br>
> this?<br>
><br>
> Thanks<br>
> Daniel<br>
><br>
> On Sat, Feb 19, 2022 at 1:46 AM Micha Silver <<a
href="mailto:tsvibar@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">tsvibar@gmail.com</a>><br>
> wrote:<br>
> > Hi<br>
> ><br>
> ><br>
> > On 19/02/2022 04:27, Daniel Kozar via grass-user
wrote:<br>
> >> Hi everyone,<br>
> >><br>
> >> When using the extension "v.class.mlR" I get
an error [Message<br>
> 1] (see<br>
> >> below) that "Rscript" cannot be located. I
traced this back to the<br>
> >> script for "v.class.mlR" and edited line 908
to read the direct<br>
> path<br>
> >> to Rscript - '/usr/local/bin/Rscript' rather
than 'Rscript' alone.<br>
> >> However, when I re-open GRASS 8.0 I get an
error [Message 2]<br>
> that the<br>
> >> extension failed when loading and that the
operation isn't<br>
> permitted.<br>
> >> I allowed for the application to have
administrative rights but it<br>
> >> still doesn't work. Does anyone know how to
work around this or<br>
> solve<br>
> >> the issue finding "Rscript"?<br>
> >><br>
> >> I have R running and have installed
necessary packages. I'm<br>
> >> running GRASS on MacOS Monterey.<br>
> ><br>
> ><br>
> > This looks like a Mac problem (which I know
nothing about).<br>
> ><br>
> > To test, can you run, first from a terminal:<br>
> ><br>
> > micha@RMS:~$ Rscript -e "sessionInfo()"<br>
> ><br>
> > Now run the same from within a GRASS session:<br>
> ><br>
> > (here's what I get)<br>
> ><br>
> > micha@RMS:QGIS$ g.version<br>
> > GRASS <a href="http://8.1.dev" rel="noreferrer"
target="_blank" moz-do-not-send="true">8.1.dev</a> <<a
href="http://8.1.dev" rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://8.1.dev</a>>
(2022)<br>
> ><br>
> > micha@RMS:QGIS$ Rscript -e "sessionInfo()"<br>
> > R version 4.1.2 (2021-11-01)<br>
> > Platform: x86_64-pc-linux-gnu (64-bit)<br>
> > Running under: Debian GNU/Linux 11 (bullseye)<br>
> ><br>
> > Matrix products: default<br>
> > BLAS: /usr/lib/x86_64-linux-gnu/
openblas-pthread/libblas.so.3<br>
> > LAPACK: /usr/lib/x86_64-linux-gnu/<br>
> openblas-pthread/libopenblasp- <a
href="http://r0.3.13.so" rel="noreferrer" target="_blank"
moz-do-not-send="true">r0.3.13.so</a> <<a
href="http://r0.3.13.so" rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://r0.3.13.so</a>><br>
> ><br>
> > locale:<br>
> > [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C<br>
> > [3] LC_TIME=en_GB.UTF-8
LC_COLLATE=en_GB.UTF-8<br>
> > [5] LC_MONETARY=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8<br>
> > [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C<br>
> > [9] LC_ADDRESS=C LC_TELEPHONE=C<br>
> > [11] LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=C<br>
> ><br>
> > attached base packages:<br>
> > [1] stats graphics grDevices utils
datasets methods base<br>
> ><br>
> > loaded via a namespace (and not attached):<br>
> > [1] compiler_4.1.2<br>
> ><br>
> > If the Rscript executable is not found, then
v.class.mlR cannot<br>
> be run.<br>
> ><br>
> ><br>
> >><br>
> >> Any help would be appreciated.<br>
> >> - Daniel<br>
> >> ------------------------------
------------------------------<br>
> -----------------<br>
> >> *[Message 1]*<br>
> >><br>
> >> Running R now. Following output is R output.<br>
> >><br>
> >> Traceback (most recent call last):<br>
> >><br>
> >> File "/Users/dankozar/Library/
GRASS/8.0/Addons/scripts/v.<br>
> class.mlR",<br>
> >> line 977, in <module><br>
> >><br>
> >> main()<br>
> >><br>
> >> File "/Users/dankozar/Library/
GRASS/8.0/Addons/scripts/v.<br>
> class.mlR",<br>
> >> line 908, in main<br>
> >><br>
> >> subprocess.check_call(<br>
> >><br>
> >> File<br>
> >> "/Applications/<a
href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">GRASS-8.0.app/</a>
<<a href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://GRASS-8.0.app/</a>><br>
> Contents/Resources/lib/ python3.9/subprocess.py",<br>
> >> line 368, in check_call<br>
> >><br>
> >> retcode = call(*popenargs, **kwargs)<br>
> >><br>
> >> File<br>
> >> "/Applications/<a
href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">GRASS-8.0.app/</a>
<<a href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://GRASS-8.0.app/</a>><br>
> Contents/Resources/lib/ python3.9/subprocess.py",<br>
> >> line 349, in call<br>
> >><br>
> >> with Popen(*popenargs, **kwargs) as p:<br>
> >><br>
> >> File<br>
> >> "/Applications/<a
href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">GRASS-8.0.app/</a>
<<a href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://GRASS-8.0.app/</a>><br>
> Contents/Resources/lib/ python3.9/subprocess.py",<br>
> >> line 951, in __init__<br>
> >><br>
> >> self._execute_child(args, executable,
preexec_fn, close_fds,<br>
> >><br>
> >> File<br>
> >> "/Applications/<a
href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">GRASS-8.0.app/</a>
<<a href="http://GRASS-8.0.app/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://GRASS-8.0.app/</a>><br>
> Contents/Resources/lib/ python3.9/subprocess.py",<br>
> >> line 1821, in _execute_child<br>
> >><br>
> >> raise child_exception_type(errno_ num,
err_msg, err_filename)<br>
> >><br>
> >> FileNotFoundError: [Errno 2] No such file or
directory: 'Rscript'<br>
> >><br>
> >><br>
> >> *[Message 2]*<br>
> >><br>
> >> Details: <[Errno 1] Operation not
permitted: 'v.class.mlR'><br>
> >><br>
> >> WARNING: Some addons failed when loading.
Please consider to<br>
> update<br>
> >> your addons by running 'g.extension.all -f'.<br>
> >><br>
> >><br>
> >> --<br>
> >> Thank you,<br>
> >><br>
> >> Daniel Kozar<br>
> >> PhD Candidate<br>
> >> UC Davis - Hydrologic Sciences<br>
> >> <a href="mailto:djkozar@ucdavis.edu"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">djkozar@ucdavis.edu</a><br>
> >> (814) 380-6900<br>
> >><br>
> >> ______________________________
_________________<br>
> >> grass-user mailing list<br>
> >> <a href="mailto:grass-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
> >> <a href="https://lists.osgeo.org/"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/</a>
mailman/listinfo/grass-user<br>
> ><br>
> > --<br>
> > Micha Silver<br>
> > Ben Gurion Univ.<br>
> > Sde Boker, Remote Sensing Lab<br>
> > cell: +972-523-665918<br>
> ><br>
> ><br>
><br>
><br>
> -- <br>
> Thank you,<br>
><br>
> Daniel Kozar<br>
> Graduate Student<br>
> UC Davis - Hydrologic Sciences<br>
> <a href="mailto:djkozar@ucdavis.edu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">djkozar@ucdavis.edu</a><br>
> (814) 380-6900<br>
><br>
><br>
> -- <br>
> Thank you,<br>
><br>
> Daniel Kozar<br>
> Graduate Student<br>
> UC Davis - Hydrologic Sciences<br>
> <a href="mailto:djkozar@ucdavis.edu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">djkozar@ucdavis.edu</a><br>
> (814) 380-6900<br>
><br>
><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
> <a
href="https://lists.osgeo.org/mailman/listinfo/grass-user"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
> <a
href="https://lists.osgeo.org/mailman/listinfo/grass-user"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
><br>
><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
> <a
href="https://lists.osgeo.org/mailman/listinfo/grass-user"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br>
-- <br>
Micha Silver<br>
Ben Gurion Univ.<br>
Sde Boker, Remote Sensing Lab<br>
cell: +972-523-665918<br>
<br>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>