<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi everyone!<br>
<br>
I am trying to wrote a Python Script for importing CSV files to
GRASS GIS without start GRASS. But I am getting a OSError:<br>
<br>
<blockquote>>>> import grass.script as g<br>
>>> g.run_command("db.in.ogr", dsn="table.csv",
output="test")<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
File "/usr/lib/grass64/etc/python/grass/script/core.py", line
189, in run_command<br>
ps = start_command(*args, **kwargs)<br>
File "/usr/lib/grass64/etc/python/grass/script/core.py", line
177, in start_command<br>
return Popen(args, **popts)<br>
File "/usr/lib/grass64/etc/python/grass/script/core.py", line
56, in __init__<br>
startupinfo, creationflags)<br>
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__<br>
errread, errwrite)<br>
File "/usr/lib/python2.7/subprocess.py", line 1249, in
_execute_child<br>
raise child_exception<br>
OSError: [Errno 2] No such file or directory<br>
</blockquote>
<br>
I attached a IPython Notebook example (print version
<a class="moz-txt-link-freetext" href="https://dl.dropbox.com/u/473460/import_table_test.html">https://dl.dropbox.com/u/473460/import_table_test.html</a>). The command
works fine in GRASS console, GRASS Python console and the script
executed inside GRASS.<br>
<br>
Any help?<br>
<br>
<div class="moz-signature">-- <br>
<b>Andrés Silva</b><br>
</div>
</body>
</html>