<div dir="ltr">Again - thanks for all the help so far, it is much appreciated. <div><br></div><div><span style="font-size:12.8px">Laurent - I ran the read</span><span style="font-size:12.8px">2_command and it returned the following:</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><div style=""><div><i>Traceback (most recent call last):</i></div><div><i>  File "<string>", line 254, in run_nodebug</i></div><div><i>  File "C:\Users\ggrewcock\Dropbox\PythonScripts\gmt\grass-interface-v2.py", line 85, in <module></i></div><div><i>    grass.read2_command('r.shade', shade='hillshade_output_python',color='dem_slope',  output='shaded_raster_hillshade_map', brighten='25', overwrite=True)</i></div><div><i>AttributeError: 'module' object has no attribute 'read2_command'</i></div></div></div><div style=""><span style="font-size:12.8px"><br></span></div><div style=""><span style="font-size:12.8px">Moritz - I have managed to get r.shade to run in the UI by creating the module object however, when I run through the script I get a parsing error. Is this because python env variables are all 'buried' within the ArcGIS folder? </span></div><div style=""><span style="font-size:12.8px"><br></span></div><div style=""><span style="font-size:12.8px"><div style="font-style:italic">Traceback (most recent call last):</div><div style="font-style:italic">  File "<string>", line 254, in run_nodebug</div><div style="font-style:italic">  File "<module1>", line 3, in <module></div><div style="font-style:italic">  File "C:\OSGEO4~1\apps\grass\grass-7.0.3\etc\python\grass\pygrass\modules\interface\module.py", line 471, in __init__</div><div style="font-style:italic">    tree = fromstring(self.xml)</div><div style="font-style:italic">  File "C:\Python27\ArcGIS10.4\Lib\xml\etree\ElementTree.py", line 1301, in XML</div><div style="font-style:italic">    return parser.close()</div><div style="font-style:italic">  File "C:\Python27\ArcGIS10.4\Lib\xml\etree\ElementTree.py", line 1654, in close</div><div style="font-style:italic">    self._raiseerror(v)</div><div style="font-style:italic">  File "C:\Python27\ArcGIS10.4\Lib\xml\etree\ElementTree.py", line 1506, in _raiseerror</div><div style="font-style:italic">    raise err</div><div style="font-style:italic">xml.etree.ElementTree.ParseError: no element found: line 1, column 0</div><div><br></div><div>Cheers, </div><div>Gareth</div></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 6:26 PM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 23/05/16 15:01, Gareth Grewcock wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Stefan - thanks for getting back to me.<br>
<br>
I had tried that before but still got issues, this time returning:<br>
'NameError: name 'r' is not defined'<br>
<br></span>
/r.shade(shade=aspect, color=elevation, output=elevation_aspect_shaded)/<br>
/Traceback (most recent call last):/<br>
/  File "<input>", line 1, in <module>/<br>
/NameError: name 'r' is not defined/<br>
/<br>
/<span class=""><br>
Any ideas what might be causing that?<br>
</span></blockquote>
<br>
<br>
If you are using pygrass, you have to create the r.shade module object before using it. See [1].<br>
<br>
If you are not using pygrass, please give us more information about what happens in your script before the call that fails.<br>
<br>
Moritz<br>
<br>
[1] <a href="https://grass.osgeo.org/grass70/manuals/libpython/pygrass_modules.html" rel="noreferrer" target="_blank">https://grass.osgeo.org/grass70/manuals/libpython/pygrass_modules.html</a><br>
</blockquote></div><br></div>