<div dir="ltr">Hi Vaclav - I agree, the GRASS GIS functionality itself is brilliant and is just what I need and the issue does lie with Python. <div><br></div><div>That said, it is a bit strange with what is going on, using the module object works for other modules apart from r.shade, I seem to get an XML parsing error: <i>xml.etree.ElementTree.ParseError: no element found: line 1, column 0</i></div><div><i><br></i></div><div>Can anybody advise what the correct syntax should be for using r.shade with pygrass please? </div><div><br></div><div>I can't even seem to be able to initialize the <i>r.shade</i> module as per the wiki but I can others. </div><div><br></div><div>This works: </div><div><br></div><div><i>slope_aspect = Module('r.slope.aspect')</i><br></div><div><br></div><div>This doesn't:</div><div><br></div><div><i>shade = Module('r.shade')</i><br></div><div><i><br></i></div><div>Thanks, </div><div>Gareth</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 24, 2016 at 10:29 PM, Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, May 24, 2016 at 1:11 PM, Laurent C. <span dir="ltr"><<a href="mailto:lrntct@gmail.com" target="_blank">lrntct@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><span class="">2016-05-24 4:36 GMT-05:00 Gareth Grewcock <<a href="mailto:garethgrewcock@gmail.com" target="_blank">garethgrewcock@gmail.com</a>>:<br>
> Again - thanks for all the help so far, it is much appreciated.<br>
><br>
> Laurent - I ran the read2_command and it returned the following:<br>
><br></span><span class="">
> output='shaded_raster_hillshade_map', brighten='25', overwrite=True)<br>
> AttributeError: 'module' object has no attribute 'read2_command'<br>
<br>
</span></span><span class="">You have to define the function yourself with the code from the wiki,<br>
it is not part of the GRASS scripting library.</span></blockquote></div><br></div><div class="gmail_extra">Hi all,<br><br></div><div class="gmail_extra">let me enter the conversation here.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Gareth, using custom function might be quite an overkill here, the original problem was wrong Python syntax (unrelated to any GRASS GIS functionality).<br><br></div><div class="gmail_extra">Laurent, if you think you must consistently use some custom function, then you should consider opening a enhancement ticket and ideally provide a patch as well. What you are using might be useful for others.<br><br></div><div class="gmail_extra">Best,<br></div><div class="gmail_extra">Vaclav<br></div></div>
</blockquote></div><br></div>