Discussion:
[GRASS-stats] error when trying to start GRASS from Rstudio in Windows
Veronica Andreo
2018-10-27 14:41:42 UTC
Permalink
Hi

I taught a GRASS course last week and all students got the same error when
trying to init GRASS from R or Rstudio (in all cases grass was installed
through OSGeo4W installer).

HereÂŽs the command we used (paths must be adapted accordingly):

initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.2RC2",
gisDbase = "C:/Users/RETA/Documents/grassdata",
location = "nc_spm_08_grass7",
mapset = "user1",
SG = "elevation")

The pop-up error is a missing iconv.dll. See screenshot attached. I believe
all locales were in Spanish as well as the laptop I am testing now. After
many attempts to try to close the pop-up error, we got the following in the
Rstudio console:

Error in if (!compatible) { : argument is of length zeroIn addition:
Warning messages:1: In system(paste("g.dirseps.exe -g",
shQuote(Sys.getenv("GISRC"))), : running command 'g.dirseps.exe -g
"junk"' had status 3092: In system(paste("g.dirseps.exe -g",
shQuote(gisDbase)), intern = TRUE) : running command 'g.dirseps.exe
-g "C:/Users/RETA/Documents/grassdata"' had status 3093: In
dir.create(loc_path) : cannot create dir 'NA\nc_spm_08_grass7',
reason 'No such file or directory'4: In dir.create(paste(loc_path,
"PERMANENT", sep = "/")) : cannot create dir
'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or directory'5:
In dir.create(paste(loc_path, mapset, sep = "/")) : cannot create dir
'NA\nc_spm_08_grass7\user1', reason 'No such file or directory'6: In
system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
running command 'g.version.exe' had status 309

Is this grass or windows problem? I did not get this error in this same
laptop a month ago when Roger fixed some other problems. Seems that
something changed meanwhile.

Cheers,
Vero
Felipe Carrillo
2018-10-27 15:25:04 UTC
Permalink
Hi Vero;I got the same error a while back and I ended up finding a workaround by copying all of the .dll files from C:\OSGeo4W64\bin to C:\OSGeo4W64\apps\grass\grass-7.4.1\bin. I have grass installed on my C drive but follow the path to your installation path bin. It appears that the .dlls are different or incompatible. 



Felipe D. CarrilloSupervisory Fishery BiologistDepartment of the InteriorUS Fish & Wildlife ServiceCalifornia, USAhttp://www.fws.gov/redbluff/rbdd_jsmp.html


On Saturday, October 27, 2018, 7:42:00 AM PDT, Veronica Andreo <***@gmail.com> wrote:

Hi

I taught a GRASS course last week and all students got the same error when trying to init GRASS from R or Rstudio (in all cases grass was installed through OSGeo4W installer).

HereÂŽs the command we used (paths must be adapted accordingly):
initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.2RC2",
          gisDbase = "C:/Users/RETA/Documents/grassdata",
          location = "nc_spm_08_grass7",
          mapset = "user1",
          SG = "elevation")
The pop-up error is a missing iconv.dll. See screenshot attached. I believe all locales were in Spanish as well as the laptop I am testing now. After many attempts to try to close the pop-up error, we got the following in the Rstudio console:

Error in if (!compatible) { : argument is of length zero
In addition: Warning messages:
1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :
running command 'g.dirseps.exe -g "junk"' had status 309
2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE) :
running command 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"' had status 309
3: In dir.create(loc_path) :
cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or directory'
4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :
cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or directory'
5: In dir.create(paste(loc_path, mapset, sep = "/")) :
cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or directory'
6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
running command 'g.version.exe' had status 309

Is this grass or windows problem? I did not get this error in this same laptop a month ago when Roger fixed some other problems. Seems that something changed meanwhile.
Cheers,Vero
Helmut Kudrnovsky
2018-10-27 15:50:38 UTC
Permalink
Post by Felipe Carrillo
I got the same error a while back and I ended up finding a workaround by
copying all of the .dll files from >C:\OSGeo4W64\bin to
C:\OSGeo4W64\apps\grass\grass-7.4.1\bin. I have grass installed on my C
drive >but follow the path to your installation path bin. It appears that
the .dlls are different or incompatible.

yes, it is a dll mismatch. please report this in the GRASS ML, or better
open a ticket about this in the bugtracker



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
Veronica Andreo
2018-11-01 11:56:28 UTC
Permalink
Done in
https://trac.osgeo.org/grass/ticket/3688
but, no news so far...

Vero
Post by Helmut Kudrnovsky
Post by Felipe Carrillo
I got the same error a while back and I ended up finding a workaround by
copying all of the .dll files from >C:\OSGeo4W64\bin to
C:\OSGeo4W64\apps\grass\grass-7.4.1\bin. I have grass installed on my C
drive >but follow the path to your installation path bin. It appears that
the .dlls are different or incompatible.
yes, it is a dll mismatch. please report this in the GRASS ML, or better
open a ticket about this in the bugtracker
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
_______________________________________________
grass-stats mailing list
https://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler
2018-11-01 12:17:34 UTC
Permalink
Post by Veronica Andreo
Done in
https://trac.osgeo.org/grass/ticket/3688
but, no news so far...
As far as I seee the a iconv.dll-issue (missing iconv.dll) is not yet
mentioned in the ticket.
More details on that might be useful.

Markus
Veronica Andreo
2018-11-01 12:20:35 UTC
Permalink
In the body of the ticket I mentioned that the "pop-up error is a missing
iconv.dll" and I also linked this email thread... how to re-remark that or
make it clearer?
Post by Markus Neteler
Post by Veronica Andreo
Done in
https://trac.osgeo.org/grass/ticket/3688
but, no news so far...
As far as I seee the a iconv.dll-issue (missing iconv.dll) is not yet
mentioned in the ticket.
More details on that might be useful.
Markus
Markus Neteler
2018-11-01 12:47:28 UTC
Permalink
In the body of the ticket I mentioned that the "pop-up error is a missing iconv.dll" and
Yes - but the real error message might help.

Markus
Veronica Andreo
2018-11-01 12:53:36 UTC
Permalink
done
Post by Veronica Andreo
In the body of the ticket I mentioned that the "pop-up error is a
missing iconv.dll" and
Yes - but the real error message might help.
Markus
Helmut Kudrnovsky
2018-11-02 19:09:04 UTC
Permalink
On Thu, Nov 1, 2018 at 1:20 PM Veronica Andreo &lt;
In the body of the ticket I mentioned that the "pop-up error is a missing iconv.dll" and
Yes - but the real error message might help.
see https://lists.osgeo.org/pipermail/grass-dev/2018-November/090433.html
for the solution:

"starting R/RGUi/RStudio from the OSGeo4W-console, then it works."




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
Helmut Kudrnovsky
2018-10-27 15:31:51 UTC
Permalink
Post by Veronica Andreo
Hi
I taught a GRASS course last week and all students got the same error when
trying to init GRASS from R or Rstudio (in all cases grass was installed
through OSGeo4W installer).
initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.2RC2",
gisDbase = "C:/Users/RETA/Documents/grassdata",
location = "nc_spm_08_grass7",
mapset = "user1",
SG = "elevation")
The pop-up error is a missing iconv.dll. See screenshot attached. I believe
all locales were in Spanish as well as the laptop I am testing now. After
many attempts to try to close the pop-up error, we got the following in the
Warning messages:1: In system(paste("g.dirseps.exe -g",
shQuote(Sys.getenv("GISRC"))), : running command 'g.dirseps.exe -g
"junk"' had status 3092: In system(paste("g.dirseps.exe -g",
shQuote(gisDbase)), intern = TRUE) : running command 'g.dirseps.exe
-g "C:/Users/RETA/Documents/grassdata"' had status 3093: In
dir.create(loc_path) : cannot create dir 'NA\nc_spm_08_grass7',
reason 'No such file or directory'4: In dir.create(paste(loc_path,
"PERMANENT", sep = "/")) : cannot create dir
In dir.create(paste(loc_path, mapset, sep = "/")) : cannot create dir
'NA\nc_spm_08_grass7\user1', reason 'No such file or directory'6: In
running command 'g.version.exe' had status 309
Is this grass or windows problem? I did not get this error in this same
laptop a month ago when Roger fixed some other problems. Seems that
something changed meanwhile.
tested here now with

----------------
System Info
GRASS version: 7.4.2
GRASS SVN revision: r73591
Build date: 2018-10-23
Build platform: x86_64-w64-mingw32
GDAL: 2.3.2
PROJ.4: 5.2.0
GEOS: 3.7.0
SQLite: 3.17.0
Python: 2.7.14
wxPython: 2.8.12.1
Platform: Windows-10-10.0.17134 (OSGeo4W)
-----------------

----------------
Post by Veronica Andreo
sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

l
[1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252
LC_MONETARY=German_Austria.1252 LC_NUMERIC=C
LC_TIME=German_Austria.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rgrass7_0.1-10 XML_3.98-1.11 sp_1.3-1

loaded via a namespace (and not attached):
[1] compiler_3.4.4 grid_3.4.4 lattice_0.20-35

-----------------

confirmed, also here a iconv.dll-issue (missing iconv.dll); and also
confirmed that it worked a month or so ago.

closer look at the error message and the used dependencies:

winGRASS 7.4.2 is now compiled against GDAL: 2.3.2 and PROJ.4: 5.2.0

when I tried a month or so ago, winGRASS was compiled against GDAL 2.0.X (or
similar) and PROJ.4 4.9. (or similar).

it seems there could be a dll mismatch between old and new dependencies
versions; hence the iconv.dll issue.






-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
Loading...