Solved. I found that closing RStudio and then installing GRASS extensions, and reopening RStudio afterwards solved the issue. Solution described here <http://osgeo-org.1560.x6.nabble.com/GRASS-GIS-7-0-stable-and-R-integration-issue-td5281770.html> .
---------- Forwarded message ---------- From: James Duffy <[email protected]> Date: 3 May 2017 at 14:44 Subject: Using g.extension in with rgrass7 in R To: grass-user <[email protected]> Hello, I'm trying to use GRASS in RStudio using the 'rgrass7' pacakge. So far I have: *library(rgrass7)initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.3.svn", gisDbase = "C:/Sandbox/RGRASS/", location = "TEST", mapset = "MAP1",override=TRUE)in.rast <- "C:/Users/James/Desktop/15m_site2/subset_output/15m_site2_subset_ortho.tif"execGRASS("r.in.gdal", flags="o", parameters=list(input=in.rast, output="ortho"))* Which works fine! However, when I want to install an extension with: *execGRASS("g.extension", parameters=list(extension="i.segment.uspo", operation="add")) * I get the following error: *Downloading precompiled GRASS Addons <i.segment.uspo>...ERROR: Variable 'LOCATION_NAME' not setERROR: Variable 'LOCATION_NAME' not setERROR: Variable 'LOCATION_NAME' not setTraceback (most recent call last): File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/g.extension.py <http://g.extension.py>", line 1737, in <module> sys.exit(main()) File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/g.extension.py <http://g.extension.py>", line 1716, in main install_extension(source=source, url=url, xmlurl=xmlurl) File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/g.extension.py <http://g.extension.py>", line 702, in install_extension blist = install_extension_xml(xmlurl, mlist) File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/g.extension.py <http://g.extension.py>", line 922, in install_extension_xml write_xml_modules(xml_file, tree) File "C:/OSGeo4W64/apps/grass/grass-7.3.svn/scripts/g.extension.py <http://g.extension.py>", line 601, in write_xml_modules libgis_revison = grass.version()['libgis_revision']KeyError: 'libgis_revision'Warning message:running command 'g.extension.bat extension=i.segment.uspo operation=add' had status 1* Can anyone tell me where I have to set the 'LOCATION_NAME' please? Kind regards James -- *James Duffy* PhD Researcher Environment and Sustainability Institute Penryn Campus University of Exeter Penryn Cornwall TR10 9FE -- *James Duffy* PhD Researcher Environment and Sustainability Institute Penryn Campus University of Exeter Penryn Cornwall TR10 9FE
_______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
