[GRASS-user] python/grass script not working on virtual machine but ok on local machine

Group,
I need help with the following. The attached script works as expected on the local machine (pyhon 2.7; Grass70) but does not work on the virtual machine (python 2.7 and Grass70). The process gets stuck at …


out, err = p.communicate()
if p.returncode != 0:
print >>sys.stderr, ‘ERROR: %s’ % err
print >>sys.stderr, ‘ERROR: Cannot generate location (%s)’ % startcmd
sys.exit(-1)
else:
print ‘Created location %s’ % location_path

No error is reported and it does not create the temporary location.

Any help/suggestion is appreciated.

Alassane

(attachments)

pygrassnotworking.py (4.58 KB)

Group,
No need to respond. I was able to resolve the issue by installing the newer Grass version.

alassane

···

On Tue, Jan 2, 2018 at 1:28 AM, alassane toure <atourej@gmail.com> wrote:

Group,
I need help with the following. The attached script works as expected on the local machine (pyhon 2.7; Grass70) but does not work on the virtual machine (python 2.7 and Grass70). The process gets stuck at …


out, err = p.communicate()
if p.returncode != 0:
print >>sys.stderr, ‘ERROR: %s’ % err
print >>sys.stderr, ‘ERROR: Cannot generate location (%s)’ % startcmd
sys.exit(-1)
else:
print ‘Created location %s’ % location_path

No error is reported and it does not create the temporary location.

Any help/suggestion is appreciated.

Alassane