Dear,
I have prepared a couple of scripts to execute a batch job: the first
opens a csv file and formats the data for the second (invoked from the
first) that include some grass functionality.
The second script uses grass functionality without starting grass
explicitly.
If I execute the first script from shell all it is working, but if i
invoke it from a php button (shell_exec('python path/script.py')) I
receive the error: /Cannot find GRASS GIS 7 start script (['grass72',
'--config', 'path'])/
I saw that it is related to subprocess (here the code):
/p = subprocess.Popen(startcmd, shell=False,stdout=subprocess.PIPE,
stderr=subprocess.PIPE)//
//out, err = p.communicate()//
//if p.returncode != 0://
// print >>sys.stderr, "ERROR: Cannot find GRASS GIS 7 start script
(%s)" % startcmd//
// sys.exit(-1)//
//gisbase = out.strip('\n\r')/
but I am not expert about this, so I ask for your help.
What could I do?
I have already set sudoers www-data ALL=NOPASSWD: ALL and checked
permission.
Thanks in advance
carmine
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user