[GRASS-dev] [GRASS GIS] #3835: v.distance returns a 'Syntax error' when used from python

GRASS GIS trac at osgeo.org
Tue Apr 30 06:20:28 PDT 2019


#3835: v.distance returns a 'Syntax error' when used from python
----------------------+-------------------------
 Reporter:  epifanio  |      Owner:  grass-dev@…
     Type:  defect    |     Status:  new
 Priority:  normal    |  Milestone:
Component:  Vector    |    Version:  svn-trunk
 Keywords:            |        CPU:  x86-64
 Platform:  Linux     |
----------------------+-------------------------
 Trying to run `v.distance` from `grass.script.run_command()` returns a
 syntax error

 {{{
 import grass.script as grass
 grass.run_command('v.db.addcolumn',
     map='points_of_interest',
     columns="distance double precision")

 grass.run_command('v.distance',
                   from='points_of_interest',
                   to='points_of_interest',
                   upload='distance',
                   column='distance')
 File "<ipython-input-9-28b7e4b9716c>", line 2
   from='points_of_interest',
        ^
 SyntaxError: invalid syntax
 }}}

 Tested on:

 GRASS GIS version: grass-ci on github
 {{{
 git rev-parse --short HEAD
 2860974f
 }}}
 GRASS LOCATION: nc_basic_spm_grass7

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3835>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list