Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/grass64/etc/python/grass/script/core.py”, line 198, in feed_command
return start_command(*args, **kwargs)
File “/usr/lib/grass64/etc/python/grass/script/core.py”, line 148, in start_command
return Popen(args, **popts)
File “/usr/lib/grass64/etc/python/grass/script/core.py”, line 53, in init
startupinfo, creationflags)
File “/usr/lib/python2.6/subprocess.py”, line 623, in init
errread, errwrite)
File “/usr/lib/python2.6/subprocess.py”, line 1141, in _execute_child
raise child_exception
OSError: [Errno 7] Argument list too long
Im pretty sure i’m missing something about how the Popen pipes are accessed between these two commands. Any suggestions would be most welcome.
Generally, this is the form that I use for python scripts and popen
(these examples are directly from working scripts of mine, but of
course you'll have to adapt them):
On 17 February 2011 20:36, Peter Tittmann <ptittmann@gmail.com> wrote:
Greetings,
I'm attempting to pipe the results from:
pts=sub.Popen('las2txt -i %s --parse xyz --keep-classes 2 --delimiter "|"
--stdout'%path, shell=True, stdout=sub.PIPE)
to the appropriate grass.?_command('r.in.xyz', etc...)
i've tried the following:
mkInRast=grass.feed_command("r.in.xyz", input=pts.communicate()[0],
output='tester', method='mean')
which results in:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/grass64/etc/python/grass/script/core.py", line 198, in
feed_command
return start_command(*args, **kwargs)
File "/usr/lib/grass64/etc/python/grass/script/core.py", line 148, in
start_command
return Popen(args, **popts)
File "/usr/lib/grass64/etc/python/grass/script/core.py", line 53, in
__init__
startupinfo, creationflags)
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 7] Argument list too long
Im pretty sure i'm missing something about how the Popen pipes are accessed
between these two commands. Any suggestions would be most welcome.
Best,
Peter