Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Python + GME (Spatial Ecology) + Subprocess.call

$
0
0
I am attempting to run GME functions using python using "subprocess.call". But every time I receive a Windows error message (see attached image). Apparently the log file cannot be found (incorrect path). I was wondering if this is because of the double forward slash (see red circle in attached image). Is this really the cause of the error? If yes, then how can this be fixed?

I will post the code I am using:

Code:

import subprocess as subp
subp.call(r'C:\Program Files\SpatialEcology\GME\SEGME.exe -c run(in=\"H:\GME\testing\text_commands\exportcsv.txt\");')

The text file contains the following:
Code:

export.csv(in="H:\GME\testing\data\test4csv.shp", out="H:\GME\testing\text_commands\output\exportcsv.csv");
Attached Thumbnails
Click image for larger version

Name:	path_error.PNG‎
Views:	N/A
Size:	33.8 KB
ID:	27191  

Viewing all articles
Browse latest Browse all 2485

Trending Articles