[GRASS-stats] Issue with grass initialization with rgrass 0.4-2
Roger Bivand
Roger.Bivand at nhh.no
Fri Jun 7 03:55:32 PDT 2024
Améline's message here is to solicit input from others, and may be followed up here and/or at https://github.com/rsbivand/rgrass/issues/88
Roger
--
Roger Bivand
Emeritus Professor
Norwegian School of Economics
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway
Roger.Bivand at nhh.no
________________________________________
From: grass-stats <grass-stats-bounces at lists.osgeo.org> on behalf of Améline Vallet via grass-stats <grass-stats at lists.osgeo.org>
Sent: 07 June 2024 11:03
To: grass-stats at lists.osgeo.org
Subject: [GRASS-stats] Issue with grass initialization with rgrass 0.4-2
Dear all,
Since I updated GRASS (8.2 -> 8.3.2) and rgrass (?-> 0.4-2), the
installation seems broken and I can't start a GRASS session from R
anymore. The error message I receive is the following:
Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html =
as_html, :
Premature end of data in tag guisection line 1 [77]
De plus : Message d'avis :
Dans readLines(outFile) :
ligne finale incomplète trouvée dans '/tmp/Rtmp9qeL4f/file36b3e2cdcc8ad'
Erreur dans parseGRASS(cmd, legacyExec = legacyExec) : g.region not parsed
Here below an example which I hope is reproducible:
Sys.setenv("GRASS_INSTALLATION"="/usr/lib/grass83")
library(rgrass)
library(unixtools)
set.tempdir("/my_path/temporary_files")
GRASS_INSTALLATION <- Sys.getenv("GRASS_INSTALLATION")
loc <- initGRASS(gisBase=GRASS_INSTALLATION, home=tempdir(), SG=r,
override=TRUE, remove_GISRC = TRUE) #return error message
loc2 <- initGRASS() #return error message
I receive the same error message whether I use a custom path for temp
files or not, and when I manually indicate within the initGRASS function
custom entry parameters.
We are using GRASS 8.3.2 and R version 4.4.0 in a linux environment
(Ubuntu 22.04.4 LTS). GRASS works well (I can use all applications from
a GRASS session started in the terminal).
print(version)
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24)
nickname Puppy Cup
The environment variables seem all correct:
_R_CHECK_COMPILATION_FLAGS_KNOWN_
-Wformat -Werror=format-security
-Wdate-time
BROWSER /usr/lib/rstudio-server/bin/postback/rpostback-browser
CLICOLOR_FORCE 1
DISPLAY :0
EDITOR vi
GIS_LOCK 817
GISBASE /usr/lib/grass83
GISDBASE /home/avallet/grassdata
GISRC /home/avallet/.grassrc8
GIT_ASKPASS rpostback-askpass
GRASS_ADDON_BASE /home/avallet/.grass8/addons
GRASS_INSTALLATION /usr/lib/grass83
GRASS_MESSAGE_FORMAT text
GRASS_PAGER cat
GRASS_PYTHON python3
HOME /home/avallet
LANG fr_FR.UTF-8
LD_LIBRARY_PATH
/usr/lib/grass83/lib::/usr/lib/R/lib:/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server
LN_S ln -s
LOCATION_NAME file36b3e68712934
LOGNAME avallet
MAKE make
MAPSET file36b3e656a1ed9
MPLENGINE tkAgg
PAGER /usr/bin/pager
PATH
/usr/lib/grass83/bin:/usr/lib/grass83/scripts:/home/avallet/.grass8/addons/bin:/home/avallet/.grass8/addons/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/lib/rstudio-server/bin/quarto/bin:/usr/lib/rstudio-server/bin/postback
PYTHONPATH /usr/lib/grass83/etc/python
R_BROWSER xdg-open
R_BZIPCMD /bin/bzip2
R_CLI_HAS_HYPERLINK_IDE_HELP true
R_CLI_HAS_HYPERLINK_IDE_RUN true
R_CLI_HAS_HYPERLINK_IDE_VIGNETTE
true
R_DOC_DIR /usr/share/R/doc
R_GZIPCMD /bin/gzip -n
R_HOME /usr/lib/R
R_INCLUDE_DIR /usr/share/R/include
R_LIBS_SITE
/usr/local/lib/R/site-library/:/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library
R_LIBS_USER /home/avallet/R/x86_64-pc-linux-gnu-library/4.4
R_PAPERSIZE letter
R_PAPERSIZE_USER letter
R_PDFVIEWER /usr/bin/xdg-open
R_PLATFORM x86_64-pc-linux-gnu
R_PRINTCMD /usr/bin/lpr
R_RD4PDF times,inconsolata,hyper
R_SESSION_TMPDIR /tmp/Rtmp9qeL4f
R_SHARE_DIR /usr/share/R/share
R_STRIP_SHARED_LIB strip --strip-unneeded
R_STRIP_STATIC_LIB strip --strip-debug
R_TEXI2DVICMD /usr/bin/texi2dvi
R_UNZIPCMD /usr/bin/unzip
R_ZIPCMD /usr/bin/zip
RMARKDOWN_MATHJAX_PATH /usr/lib/rstudio-server/resources/mathjax-27
RS_PORT_TOKEN 1be40ec3f539
RS_RPOSTBACK_PATH /usr/lib/rstudio-server/bin/rpostback
RS_SERVER_RPC_SOCKET_PATH
/var/run/rstudio-server/rstudio-rserver/session-server-rpc.socket
RS_SERVER_URL http://134.158.74.74:8080/
RS_SESSION_TMP_DIR /var/run/rstudio-server/rstudio-rsession
RS_SESSION_URL
RSTUDIO 1
RSTUDIO_CLI_HYPERLINKS true
RSTUDIO_CONSOLE_COLOR 256
RSTUDIO_CONSOLE_WIDTH 112
RSTUDIO_HTTP_REFERER http://134.158.74.74:8080/
RSTUDIO_PANDOC /usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64
RSTUDIO_PROGRAM_MODE server
RSTUDIO_R_MODULE
RSTUDIO_R_PRELAUNCH_SCRIPT
RSTUDIO_R_REPO
RSTUDIO_R_VERSION_LABEL
RSTUDIO_SESSION_PID 224062
RSTUDIO_SESSION_STREAM avallet-d
RSTUDIO_USER_IDENTITY avallet
RSTUDIO_USER_IDENTITY_DISPLAY avallet
SED /bin/sed
SSH_ASKPASS rpostback-askpass
TAR /bin/tar
TERM xterm-256color
USER avallet
```
Anyone knows what might be the problem?
Best regards,
Améline
--
Améline Vallet
------------------
Researcher at AgroParisTech
Laboratoire Ecologie, Systématique et Evolution - UMR 8079
Centre international de recherche sur l'environnement et le développement - UMR 8568
http://www.amelinevallet.com/ | @vallet_ameline
_______________________________________________
grass-stats mailing list
grass-stats at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats
More information about the grass-stats
mailing list