r-spatial / link2GI

Simplify the linking of GIS/RS and CLI tools
https://r-spatial.github.io/link2GI
GNU General Public License v3.0
25 stars 7 forks source link

GRASS .bat commands not run after linking with linkGRASS7 #53

Open ofr1tz opened 3 years ago

ofr1tz commented 3 years ago

Hi,

when using linkGRASS7 to initialise GRASS, I cannot run GRASS .bat commands.

I am using standalone winGRASS 7.8.5, rgrass7 0.2-5 and link2GI 0.4-6.

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Starting Grass with ...

linkGRASS7(srtm, default_GRASS7 = c("C:\\Program Files\\GRASS GIS 7.8", "GRASS GIS 7.8", "NSIS"))

... I am able to use writeRAST/readRAST and run GRASS .exe commands with execGRASS, but not .bat commands such as r.fillnulls. I get the following error message:

Error : XML content does not seem to be XML: 'onnte nicht gefunden werden.'
Zusätzlich: Warnmeldung:
In system(cmd0, intern = TRUE) :
  Ausführung von Kommando 'r.fillnulls.bat --interface-description' ergab Status 1
Fehler in parseGRASS(cmd, legacyExec = legacyExec) : 
  r.fillnulls not parsed

See also this rgrass7 issue.

gisma commented 3 years ago

Thank you for pointing it out. Unfortunately, I do not have a Windows PC available in the coming days. I think it is due to incorrect parsing of batch files which are not executable files. I will check asap what is wrong with the call of the python functions.