[GRASS-user] python 'NamError' r.landscape.evol

Maria Cecilia Zalazar zalazarmariacecilia at gmail.com
Fri May 1 08:44:36 PDT 2020


Hello. In previous (win)grass versions I was able to work with
r.landscape.evol addon. Now with 7.8.2 wingrass version appears a python
NameError:



*r.landscape.evol elev=DEM_21x21 at PERMANENT initbdrk=0 smoothing=no
prefx=levol_test outdem=elevation_test outsoil=soildepth_test number=1*

*Traceback (most recent call last):*

*  File "C:\Users\USUARIO\AppData\Roaming\GRASS7\addons/scrip*

*ts/r.landscape.evol.py <http://r.landscape.evol.py/>", line 665, in
<module>*

*    f = file(statsout, 'wt')*

*NameError: name 'file' is not defined*



It seems that the script was written in Python < 3 and ‘file()’ is not
supported in Python 3. Is possible that the addon needs to transform into
valid Python 3.x code?

Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200501/4980fb35/attachment.html>


More information about the grass-user mailing list