Coder Social home page Coder Social logo

Comments (17)

isaacullah avatar isaacullah commented on July 18, 2024 1

from grass-addons.

isaacullah avatar isaacullah commented on July 18, 2024

from grass-addons.

petrasovaa avatar petrasovaa commented on July 18, 2024

It depends on you. In a similar case of r.learn.ml the author added r.learn.ml2 because users wanted the old version for compatibility. You can rename the old one and keep it there for at least some time and upload the new one under the same name if appropriate. Or, if you think users should really just switch to new one, provide guidance how to start using the new one and just update it in git, the history will be there if anyone really wants to run the old one. But in any case it would be good to fix the current one for Python 3, hopefully shouldn't be too much work.

from grass-addons.

isaacullah avatar isaacullah commented on July 18, 2024

from grass-addons.

neteler avatar neteler commented on July 18, 2024

Would a fix following https://stackoverflow.com/a/28121192/452464 work?

from grass-addons.

mczalazar avatar mczalazar commented on July 18, 2024

Hello. I´m trying to fix the current addon version for Python 3. The problem is with the statsout file. I did some changes in r.landscape.evol.py (line 654). If you have read and write permissions the following sentences works fine. I tried with ‘a+’ and ‘w+’ but don´t work. Should be change 'MAPSET' environment?
Thanks you

#Make the statsout file with correct column headers
if options["statsout"] == "":
env = grass.gisenv()
mapset = env['MAPSET']
statsout = '%s_%slsevol_stats.csv' % (mapset, prefx)
else:
statsout = options["statsout"]
if os.path.isfile(statsout):
#cecilia
f = open(statsout,'a')
f.close()
else:
#cecilia
f = open(statsout,'w')
f.write('These statistics are in units ……………')
f.close()

from grass-addons.

isaacullah avatar isaacullah commented on July 18, 2024

from grass-addons.

neteler avatar neteler commented on July 18, 2024

The new version of r.landscape.evol compiles for me but I didn't test it.

Can this issue be closed, @hellik ?

from grass-addons.

mczalazar avatar mczalazar commented on July 18, 2024

from grass-addons.

neteler avatar neteler commented on July 18, 2024

You are right, there is still a bug:

Traceback (most recent call last):
  File "C:/msys64/usr/src/grass783/dist.x86_64-w64-mingw32/fools/mkhtml.py", line 266, in <module>
    src_data = read_file(src_file)
  File "C:/msys64/usr/src/grass783/dist.x86_64-w64-mingw32/tools/mkhtml.py", line 158, in read_file
    return decode(s)
  File "C:/msys64/usr/src/grass783/dist.x86_64-w64-mingw32/tools/mkhtml.py", line 66, in decode
    return bytes_.decode(enc)
  File "C:\\\\OS3944~1\\apps\\Python37\lib\encodings\cp1250.py", line 15, in decode
    return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 32941: character maps to <undefined>

From https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.3/logs/r.landscape.evol.log

Overview:
https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.3/logs/

from grass-addons.

neteler avatar neteler commented on July 18, 2024

The updated module now compiles on Windows: https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.3/logs/r.landscape.evol.log

from grass-addons.

mczalazar avatar mczalazar commented on July 18, 2024

from grass-addons.

neteler avatar neteler commented on July 18, 2024

Thanks for the feedback, closing. In case of further issues pls open a new report.

from grass-addons.

cmbarton avatar cmbarton commented on July 18, 2024

I just tried it. Is the fix now in the master branch for addons? If so, it downloads and compiles. But it still bombs for me when it runs.

Iteration 1 -- step 5/6: calculating terrain evolution and new soil depths
*************************
Traceback (most recent call last):
  File "/Users/cmbarton/Library/GRASS/7.9/Modules/scripts/r.
landscape.evol", line 878, in <module>
    main()
  File "/Users/cmbarton/Library/GRASS/7.9/Modules/scripts/r.
landscape.evol", line 302, in main
    landscapeEvol(x, (x + 1), prefx, statsout,
region1['nsres'], masterlist, f)
  File "/Users/cmbarton/Library/GRASS/7.9/Modules/scripts/r.
landscape.evol", line 689, in landscapeEvol
    sdc.stdin.write('\n'.join(sdcolors))
TypeError: a bytes-like object is required, not 'str'

There also is a new Mac problem in that svn no longer comes with Apple Command Line Tools 11.5. This caused the the g.extension to fail, as it apparently still depends on svn to download code.

I was able to get it by downgrading to v. 11.4, but it will be a problem for Mac users in the future.

from grass-addons.

neteler avatar neteler commented on July 18, 2024

(please report the SVN-g.extension issue here: https://github.com/OSGeo/grass/issues)

from grass-addons.

neteler avatar neteler commented on July 18, 2024

Anything still to do here?

from grass-addons.

isaacullah avatar isaacullah commented on July 18, 2024

from grass-addons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.