#3688: impossible to start grass from Rstudio in Windows
------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Keywords: | CPU: Unspecified
Platform: MSWindows |
------------------------+-------------------------
Currently it is impossible to start GRASS from R in Windows (I tested with
GRASS installed from OSGeo4W). It worked perfectly a month ago or so when
Roger Bivand fixed some issues. Apparently it is due to an incompatibility
in dependencies after GRASS was compiled against new GDAL and PROJ.
The pop-up error is a missing iconv.dll. All locales were in Spanish as
well as the laptop I tested on. 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
}}}
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Comment (by veroandreo):
I do not have the laptop with me now, I can only report back in 10 days or
so that I go back home.
In any case, what's a screen dump? I also attached the screenshot with the
error above if that's what you mean. I just translated the message because
it is in Spanish.
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Comment (by hellik):
Replying to [comment:6 hellik]:
> Replying to [comment:5 hellik]:
> >first missing dll is iconv.dll, then other missing dlls pops up.
>
> ok, found it now; started here R/RGUi/RStudio outside of the OSGeo4W-
console, then the dll's are missing.
>
> >
> > all of them are living in ''C:\OSGeo4W64\bin''
>
> starting R/RGUi/RStudio from the OSGeo4W-console, then it works.
>
> @Veronica, started your students R/RGUi/RStudio outside of the OSGeo4W-
console?
>
> maybe wiki/manuals should be updated?
>
>
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Comment (by rsbivand):
This is correct, I can replicate that RStudio started by clicking on its
icon, or by clicking on for example an Rmd file, cannot know where OSGeo4W
now keeps its extra dll files. From the latest upgrade of OSGeo4W, you
need to start RStudio from the command line in the OSGeo4W console, say
using "C:/Program Files/RStudio/bin/rstudio.exe" - with the quotation
marks because of the space in the path. The underlying causes are OSGeo4W
arguably messing up path variables, and generally rstudio getting between
the user and file system reality.
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Comment (by hellik):
Replying to [comment:8 rsbivand]:
>From the latest upgrade of OSGeo4W, you need to start RStudio from the
command line in the OSGeo4W console, say using "C:/Program
Files/RStudio/bin/rstudio.exe" - with the quotation marks because of the
space in the path.
I don't think that starting Rstudio changed with the latest upgrade of
OSGeo4W.
It's implemented to start RStudio within the winGRASS-standalone-console
as well as in the OSgeo4W-winGRASS-console (within a GRASS session) for
many years now:
{{{
22 REM set RStudio temporarily to %PATH% if it exists
23
24 IF EXIST "%ProgramFiles%\RStudio\bin\rstudio.exe" set
PATH=%PATH%;%ProgramFiles%\RStudio\bin
}}}
but it isn't yet implemented in the OSGeo4W-console itself to start it
there outside a GRASS session.
OTOH it's implemented now for a year or so to start R/RGui in the OSGeo4W-
console itself outside of a GRASS session by
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Comment (by veroandreo):
Sorry for the delay, only now I have a windows machine to test... No, my
students did not start R nor RStudio from OSGeo4W Shell (I forgot that
detail).
So, it works, but only if I move to Documents folder, for example. If I
try to start GRASS from R in C disk, I get the following:
{{{
> library(rgrass7)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: (GRASS not running)
> initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.2", gisDbase =
"C:/Users/RETA/Documents/grassdata", location = "nc_spm_08_grass7", mapset
= "user1", SG = "elevation", override=TRUE)
Error in file(file, ifelse(append, "a", "w")) :
no se puede abrir la conexión
Además: Warning message:
In file(file, ifelse(append, "a", "w")) :
no fue posible abrir el archivo 'junk': Permission denied
}}}
Seems Windows does not grant me permission to write on my own C... how
great During the course, the students hit this issue many times.
#3688: impossible to start grass from Rstudio in Windows
--------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: closed
Priority: normal | Milestone: 7.4.3
Component: Default | Version: 7.4.2
Resolution: wontfix | Keywords:
CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Changes (by veroandreo):
* status: new => closed
* resolution: => wontfix
Comment:
Replying to [comment:7 hellik]:
> Replying to [comment:6 hellik]:
> > Replying to [comment:5 hellik]:
> > >first missing dll is iconv.dll, then other missing dlls pops up.
> >
> > ok, found it now; started here R/RGUi/RStudio outside of the OSGeo4W-
console, then the dll's are missing.
> >
> > >
> > > all of them are living in ''C:\OSGeo4W64\bin''
> >
> > starting R/RGUi/RStudio from the OSGeo4W-console, then it works.
> >
> > @Veronica, started your students R/RGUi/RStudio outside of the
OSGeo4W-console?
> >
> > maybe wiki/manuals should be updated?
Will add this detail to wiki
> I think we can close the ticket.
I´m closing as wontfix since it is indeed impossible to start GRASS from R
in Windows unless one opens R from within OSGeo4W shell and move to a
folder with writing permission. Feel free to modify or reopen