[GRASS-user] Problems using qgis and grass in one python script

balotti.and at gmail.com balotti.and at gmail.com
Fri Sep 15 00:16:01 PDT 2017


Hi,
I am not an expert of using GRASS from QGIS, so I don't know if there 
are mistakes in the first part where you call GRASS, but for what I can 
see could be a problem of empty output filename IMHO.

Il 13/09/2017 13:11, T K ha scritto:
> ...
> all = ""
> grass.script.run_command('v.import', input='/home/student/qgis/all.shp',
> output=all)
> ...
Try to assign something to 'all' variable, for example:
     all="test-out"
Otherwise you could use a little bit hardcoded approach setting directly 
the variable 'output' for v.import and the variable 'input' for v.to.rast:
     v.import ... output='test-out'
     ...
     v.to.rast ... input='test-out'

Best Regards,

Andrea Balotti



More information about the grass-user mailing list