[GRASS-user] python 'NamError' r.landscape.evol
Helmut Kudrnovsky
hellik at web.de
Fri May 1 13:27:29 PDT 2020
Maria Cecilia Zalazar wrote
> 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!
some hints e.g. here:
https://stackoverflow.com/questions/28121163/python-3-doesnt-have-the-file-function/28121192
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
More information about the grass-user
mailing list