[GRASS-user] r.denoise inside python script

Carlos Grohmann carlos.grohmann at gmail.com
Tue Sep 13 11:04:46 PDT 2016


Hi all

I'm trying to run r.denoise from a python script but I'm getting some
errors (below). Apparently this is about using pipe to redirect outputs
(r.denoise is a bash script).

any ideas to work around this situation?

thanks

Carlos




>>> grass.run_command('r.denoise', input=elev, output=out_avg,
iterations=n_iter, threshold=thrshld, epsg=4326, overwrite=ow)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/local/Cellar/grass-73/7.3.svn_src_snapshot_latest/grass-7.3.svn/etc/python/grass/script/core.py",
line 408, in run_command
    ps = start_command(*args, **kwargs)
  File
"/usr/local/Cellar/grass-73/7.3.svn_src_snapshot_latest/grass-7.3.svn/etc/python/grass/script/core.py",
line 377, in start_command
    return Popen(args, **popts)
  File
"/usr/local/Cellar/grass-73/7.3.svn_src_snapshot_latest/grass-7.3.svn/etc/python/grass/script/core.py",
line 74, in __init__
    subprocess.Popen.__init__(self, args, **kwargs)
  File
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
line 710, in __init__
    errread, errwrite)
  File
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

-- 
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160913/04348797/attachment.html>


More information about the grass-user mailing list