Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning message - running command 'g.proj.exe -w' had status 884 #33

Open
obrl-soil opened this issue Oct 22, 2021 · 4 comments
Open

warning message - running command 'g.proj.exe -w' had status 884 #33

obrl-soil opened this issue Oct 22, 2021 · 4 comments

Comments

@obrl-soil
Copy link

Setup:

  • Win 10 Enterprise 10.0.19043
  • OSGeo4W
  • GRASS 7.8.6
  • R 4.1.1 64 bit
  • rgrass7 0.2-6; rgdal 1.5-27; raster 3.5-2; sp 1.4-5; sf 1.0-3
  • RStudio 1.4.1717 launched from the OSGeo4W shell
  • working within an RStudio project folder that contains an existing GRASS location in a subfolder
library(rgrass7)

initGRASS(gisBase  = file.path('C:', 'OSGeo4W', 'apps', 'grass', 'grass78'),
          gisDbase = file.path(getwd(), 'data_spatial'),  location = 'grass_data', 
          mapset   = "PERMANENT", override = TRUE)

produces the following warning:

Warning message:

> In system(syscmd, intern = intern, ignore.stderr = ignore.stderr,  :
    running command 'g.proj.exe -w' had status 884

This doesn't happen when initialising a new grass location, (e.g. in R's temp file area), only when accessing an existing one. Using gmeta() also produces the same warning. I think I've traced the issue to here, https://github.com/rsbivand/rgrass7/blob/5801ed574b6aef6da272d9dbd1939770c21879e9/R/rgrass.R#L110

specifically the use of intern = TRUE. I think the error handling line that follows isn't catching this issue, because a simple status of 884 is returned rather than anything including the word 'ERROR'. I can't find an explanation of what status 884 implies.

This effect persists whether an RStudio project is active or not, and the same issue arises if I launch RStudio normally and use my own initialization script. Everything else seems to work fine, and I have been working with this location across several previous versions of R and GRASS without this message appearing.

@rsbivand
Copy link
Owner

After installing OSGeo4W, I can reproduce the warning. However, the problem seems to be the same starting GRASS from the OSGeo4W shell in demolocation. The WKT is output when typing g.proj -w in the OSGeo4W shell. But nothing is returned when typing g.proj -w in the GRASS GUI console, and timings are as erratic as when running getLocationProj() in Rgui (I didn't try RStudio). The previous problem was that rgdal was using a newer proj.db than WinGRASS or OSGeo4W, generating the error. Now this problem OSGeo4W seems to be different, whether the rgdal or OSGeo4W proj.db is accessed. Please try the same without any R/rgrass7 and check my observation.

@rsbivand
Copy link
Owner

Not only OSGeo4W, the WinGRASS stand-alone has the same problem. Issue opened in GRASS.

@obrl-soil
Copy link
Author

After installing OSGeo4W, I can reproduce the warning. However, the problem seems to be the same starting GRASS from the OSGeo4W shell in demolocation. The WKT is output when typing g.proj -w in the OSGeo4W shell. But nothing is returned when typing g.proj -w in the GRASS GUI console, and timings are as erratic as when running getLocationProj() in Rgui (I didn't try RStudio). The previous problem was that rgdal was using a newer proj.db than WinGRASS or OSGeo4W, generating the error. Now this problem OSGeo4W seems to be different, whether the rgdal or OSGeo4W proj.db is accessed. Please try the same without any R/rgrass7 and check my observation.

Can confirm g.proj -w returns nothing in the GRASS GUI on my machine. GRASS 7.8.6RC2 on my home machine is the same. Thanks for opening the GRASS issue.

@petrasovaa
Copy link
Contributor

This was fixed couple days ago in GRASS, see OSGeo/grass#3306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants