[GRASS-dev] [GRASS GIS] #2189: PyGRASS Module does not work on Windows

GRASS GIS trac at osgeo.org
Thu Feb 6 08:10:36 PST 2014


#2189: PyGRASS Module does not work on Windows
-------------------------+--------------------------------------------------
 Reporter:  annakrat     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Python       |     Version:  svn-trunk                
 Keywords:  pygrass      |    Platform:  MSWindows 8              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by zarch):

 Replying to [ticket:2189 annakrat]:
 > PyGRASS Module class is not working on Windows. It can't find the
 command:
 >
 > {{{
 > import grass.pygrass.modules as pymod
 > region = pymod.Module("g.region")
 >
 > GrassError: 'Error running: `g.region --interface-description`.'
 > }}}
 >
 > If I enter the entire path of the command, it works:
 [[BR]]

 May be it is only a PATH problem? are you able to run the command from the
 terminal?, I'm just using:

 (http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/modules/interface/module.py#L243)
 {{{
 # call the command with --interface-description
 get_cmd_xml = subprocess.Popen([cmd, "--interface-description"],
                                stdout=subprocess.PIPE)
 }}}
 [[BR]]

 So from my understanding also:

 {{{
 core.run_command("g.region", "p")
 }}}

 Should not find the command. Someone has an idea why this is happening?
 Both are using the same python class, and both avoid to set any special
 environmental variable...

 [[BR]]


 > Maybe PyGRASS could be a separate component in trac?

 For me it's fine.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2189#comment:1>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list