Hello list,

I have problems with v.in.ogr in a python script; I use:

grass.run_command('v.in.ogr',input='d:/my_input',output='my_output',type='bo
undary,centroid',where='LENGTH !=
1',snap=0.01,min_area=0.01,flags="o",overwrite=True)

This has been working fine for years in GRASS 7.0.3 with Python 2.

 

Now, I tried in GRASS 7.8 on Python 3 and I get the following error:

ERROR 1: "LENGTH" not recognised as an available field.

FEHLER: Error setting attribute filter 'LENGTH != 1'

The field called LENGTH is present and there is no typing error. What I
absolutely not understand is that the command is working fine inside GRASS
itself! Just the Python script does not.

"LENGTH" is not a Python reserved keyword, and no SQL reserved keyword. I
also tried it with another name for that column. That also did not work.

Any ideas what could be wrong? Thank you very much.

Uwe

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to