[GRASS-dev] [GRASS GIS] #2398: grass.exec_command should add .exe where needed

GRASS GIS trac at osgeo.org
Wed Aug 20 04:43:26 PDT 2014


#2398: grass.exec_command should add .exe where needed
---------------------------+------------------------------------------------
 Reporter:  michikommader  |       Owner:  grass-dev@…              
     Type:  defect         |      Status:  new                      
 Priority:  normal         |   Milestone:  7.0.0                    
Component:  Python         |     Version:  svn-releasebranch70      
 Keywords:                 |    Platform:  MSWindows 7              
      Cpu:  x86-32         |  
---------------------------+------------------------------------------------
 Using the GUI or CMD-interface I get the following error when running
 v.centroids:
 {{{
 v.centroids input=in output=out
 Traceback (most recent call last):
   File "C:\OSGeo4W\apps\grass\grass-7.0.0svn\scripts\v.centr
 oids.py", line 69, in <module>
     main()
   File "C:\OSGeo4W\apps\grass\grass-7.0.0svn\scripts\v.centr
 oids.py", line 63, in main
     grass.exec_command("v.category", type = 'area',
 **options)
   File "C:\OSGeo4W\apps\grass\grass-7.0.0svn\etc\python\gras
 s\script\core.py", line 499, in exec_command
     os.execvpe(prog, args, env)
 }}}

 Peeking into scripts/v.centroids.py at line 63 reveals a call to
 {{{
 grass.exec_command("v.category", type = 'area', **options)
 }}}
 which fixes the error when changed to
 {{{
 grass.exec_command("v.category.exe", type = 'area', **options)
 }}}

 It looks like you have to add a ".exe" in some cases under Windows.

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



More information about the grass-dev mailing list