<div dir="ltr">Thanks Anna - that's really helpful. The fact it was written in python got me thinking. <div><br></div><div>I was running OSGeo4W64, I have since installed GRASS standalone and OSGeo4W and the r.shade module now runs successfully. </div><div><br></div><div>Thanks everybody for your help and giving up your time to look into this. </div><div><br></div><div>Cheers,</div><div>Gareth</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 1:42 PM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</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 Wed, May 25, 2016 at 5:36 AM, Gareth Grewcock<br>
<<a href="mailto:garethgrewcock@gmail.com">garethgrewcock@gmail.com</a>> wrote:<br>
> Hi Vaclav - I agree, the GRASS GIS functionality itself is brilliant and is<br>
> just what I need and the issue does lie with Python.<br>
><br>
> That said, it is a bit strange with what is going on, using the module<br>
> object works for other modules apart from r.shade, I seem to get an XML<br>
> parsing error: xml.etree.ElementTree.ParseError: no element found: line 1,<br>
> column 0<br>
><br>
> Can anybody advise what the correct syntax should be for using r.shade with<br>
> pygrass please?<br>
><br>
> I can't even seem to be able to initialize the r.shade module as per the<br>
> wiki but I can others.<br>
><br>
> This works:<br>
><br>
> slope_aspect = Module('r.slope.aspect')<br>
<br>
</span>this module is written in C<br>
<span class="">><br>
> This doesn't:<br>
><br>
> shade = Module('r.shade')<br>
<br>
</span>and this in Python. Also in the error you posted, the ArcGIS Python is<br>
used instead of the one bundled with OSGeo4W, so there seems to be<br>
some Python mixup going on, but I don't why or how to fix it...<br>
<span class="HOEnZb"><font color="#888888"><br>
Anna<br>
</font></span><span class="im HOEnZb"><br>
><br>
> Thanks,<br>
> Gareth<br>
><br>
><br>
> On Tue, May 24, 2016 at 10:29 PM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>><br>
> wrote:<br>
>><br>
>><br>
>> On Tue, May 24, 2016 at 1:11 PM, Laurent C. <<a href="mailto:lrntct@gmail.com">lrntct@gmail.com</a>> wrote:<br>
>>><br>
>>> 2016-05-24 4:36 GMT-05:00 Gareth Grewcock <<a href="mailto:garethgrewcock@gmail.com">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>
>>> > output='shaded_raster_hillshade_map', brighten='25', overwrite=True)<br>
>>> > AttributeError: 'module' object has no attribute 'read2_command'<br>
>>><br>
>>> You have to define the function yourself with the code from the wiki,<br>
>>> it is not part of the GRASS scripting library.<br>
>><br>
>><br>
>> Hi all,<br>
>><br>
>> let me enter the conversation here.<br>
>><br>
>> Gareth, using custom function might be quite an overkill here, the<br>
>> original problem was wrong Python syntax (unrelated to any GRASS GIS<br>
>> functionality).<br>
>><br>
>> Laurent, if you think you must consistently use some custom function, then<br>
>> you should consider opening a enhancement ticket and ideally provide a patch<br>
>> as well. What you are using might be useful for others.<br>
>><br>
>> Best,<br>
>> Vaclav<br>
><br>
><br>
><br>
</span><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br></div>