[GRASS-user] Rosetta Error in "r.fill.dir"

2022-04-21 Thread Daniel Kozar via grass-user
Hi everyone,

I am trying to fill in pits in a large DEM raster (the size of USGS
HUC02 "18") in GRASS 8.0. Everything works in the workflow until I get this
error when I run "r.fill.dir":

r.fill.dir input=DEM output=DEM_filled direction=DEM_dir areas=DEM_area
format=agnps --overwrite

Reading input elevation raster map...

 100%

Filling sinks...

Determining flow directions for ambiguous cases...

Found 75 unresolved areas

Repeat to get the final directions...

rosetta error: unexpectedly need to EmulateForward on a synchronous
exception x86_rip=0x4363626336 arm_pc=0x4363681804 num_insts=6 inst_index=3
x86 instruction bytes: 0x6215344901283465301 0x17042544937633142081

zsh: trace trap  r.fill.dir input=DEM output=DEM_filled direction=DEM_dir
areas=DEM_area


Can someone help me solve this issue? I am running GRASS 8.0 on an M1 Pro
chip in MacOS Monterey. I sense this is an error with Rosetta and the M1
chip, but have not received such an error prior on this computer. I have
also tried running the module through GRASS 7.6 and 7.8, but am having no
luck due to segmentation fault errors.

-- 
Best,

Daniel Kozar
PhD Candidate
UC Davis - Hydrologic Sciences
djko...@ucdavis.edu
(814) 380-6900
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Rscript error when using v.class.mlR

2022-02-19 Thread Daniel Kozar via grass-user
Hi Micha,

Thanks for the reply. I ran the script lines you sent both in the terminal
as well as a GRASS session. Rscript is recognized in the terminal command
but not in the GRASS 8.0 command. Since GRASS 8.0 did not recognize Rscript
I tried making a symbolic link for "Rscript" to the full path:
/usr/local/bin/Rscript. This still doesn't recognize the command and I'm
unsure how else to work around it.

Any Mac aficionados reading this - do you have an idea to resolve this?

Thanks
Daniel

On Sat, Feb 19, 2022 at 1:46 AM Micha Silver  wrote:

> Hi
>
>
> On 19/02/2022 04:27, Daniel Kozar via grass-user wrote:
> > Hi everyone,
> >
> > When using the extension "v.class.mlR" I get an error [Message 1] (see
> > below) that "Rscript" cannot be located. I traced this back to the
> > script for "v.class.mlR" and edited line 908 to read the direct path
> > to Rscript - '/usr/local/bin/Rscript' rather than 'Rscript' alone.
> > However, when I re-open GRASS 8.0 I get an error [Message 2] that the
> > extension failed when loading and that the operation isn't permitted.
> > I allowed for the application to have administrative rights but it
> > still doesn't work. Does anyone know how to work around this or solve
> > the issue finding "Rscript"?
> >
> > I have R running and have installed necessary packages. I'm
> > running GRASS on MacOS Monterey.
>
>
> This looks like a Mac problem (which I know nothing about).
>
> To test, can you run, first from a terminal:
>
> micha@RMS:~$ Rscript -e "sessionInfo()"
>
> Now run the same from within a GRASS session:
>
> (here's what I get)
>
> micha@RMS:QGIS$ g.version
> GRASS 8.1.dev (2022)
>
> micha@RMS:QGIS$ Rscript -e "sessionInfo()"
> R version 4.1.2 (2021-11-01)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Debian GNU/Linux 11 (bullseye)
>
> Matrix products: default
> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so
>
> locale:
>   [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
>   [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
>   [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
>   [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
>   [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods base
>
> loaded via a namespace (and not attached):
> [1] compiler_4.1.2
>
> If the Rscript executable is not found, then v.class.mlR cannot be run.
>
>
> >
> > Any help would be appreciated.
> > - Daniel
> > 
> -
> > *[Message 1]*
> >
> > Running R now. Following output is R output.
> >
> > Traceback (most recent call last):
> >
> > File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR",
> > line 977, in 
> >
> > main()
> >
> > File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR",
> > line 908, in main
> >
> > subprocess.check_call(
> >
> > File
> > "/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
>
> > line 368, in check_call
> >
> > retcode = call(*popenargs, **kwargs)
> >
> > File
> > "/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
>
> > line 349, in call
> >
> > with Popen(*popenargs, **kwargs) as p:
> >
> > File
> > "/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
>
> > line 951, in __init__
> >
> > self._execute_child(args, executable, preexec_fn, close_fds,
> >
> > File
> > "/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
>
> > line 1821, in _execute_child
> >
> > raise child_exception_type(errno_num, err_msg, err_filename)
> >
> > FileNotFoundError: [Errno 2] No such file or directory: 'Rscript'
> >
> >
> > *[Message 2]*
> >
> > Details: <[Errno 1] Operation not permitted: 'v.class.mlR'>
> >
> > WARNING: Some addons failed when loading. Please consider to update
> > your addons by running 'g.extension.all -f'.
> >
> >
> > --
> > Thank you,
> >
> > Daniel Kozar
> > PhD Candidate
> > UC Davis - Hydrologic Sciences
> > djko...@ucdavis.edu
> > (814) 380-6900
> >
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
>

-- 
Thank you,

Daniel Kozar
Graduate Student
UC Davis - Hydrologic Sciences
djko...@ucdavis.edu
(814) 380-6900


-- 
Thank you,

Daniel Kozar
Graduate Student
UC Davis - Hydrologic Sciences
djko...@ucdavis.edu
(814) 380-6900
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Rscript error when using v.class.mlR

2022-02-18 Thread Daniel Kozar via grass-user
Hi everyone,

When using the extension "v.class.mlR" I get an error [Message 1] (see
below) that "Rscript" cannot be located. I traced this back to the script
for "v.class.mlR" and edited line 908 to read the direct path to Rscript -
'/usr/local/bin/Rscript' rather than 'Rscript' alone. However, when I
re-open GRASS 8.0 I get an error [Message 2] that the extension failed when
loading and that the operation isn't permitted. I allowed for the
application to have administrative rights but it still doesn't work. Does
anyone know how to work around this or solve the issue finding "Rscript"?

I have R running and have installed necessary packages. I'm running GRASS
on MacOS Monterey.

Any help would be appreciated.
- Daniel
-
*[Message 1]*

Running R now. Following output is R output.

Traceback (most recent call last):

  File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR", line
977, in 

main()

  File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR", line
908, in main

subprocess.check_call(

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 368, in check_call

retcode = call(*popenargs, **kwargs)

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 349, in call

with Popen(*popenargs, **kwargs) as p:

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 951, in __init__

self._execute_child(args, executable, preexec_fn, close_fds,

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 1821, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'Rscript'


*[Message 2]*

Details: <[Errno 1] Operation not permitted: 'v.class.mlR'>

WARNING: Some addons failed when loading. Please consider to update your
addons by running 'g.extension.all -f'.

-- 
Thank you,

Daniel Kozar
PhD Candidate
UC Davis - Hydrologic Sciences
djko...@ucdavis.edu
(814) 380-6900
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user