Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] t.rast.whatcsv uses broken r.what query #490

Closed
neteler opened this issue Mar 24, 2021 · 3 comments
Closed

[Bug] t.rast.whatcsv uses broken r.what query #490

neteler opened this issue Mar 24, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@neteler
Copy link
Member

neteler commented Mar 24, 2021

The usage and also the test of t.rast.whatcsv fails due to an incorrect r.what call:

GRASS :testsuite > python test_whatcsv.py 

ERROR: Raster map <dummy> not found
Traceback (most recent call last):
  File "/home/mneteler/.grass7/addons/scripts/t.rast.whatcsv", line 160, in <module>
    main(options, flags)
  File "/home/mneteler/.grass7/addons/scripts/t.rast.whatcsv", line 130, in main
    r_what = gcore.read_command("r.what", map="dummy",
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 503, in read_command
    return handle_errors(returncode, stdout, args, kwargs)
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 342, in handle_errors
    raise CalledModuleError(module=None, code=code,
grass.exceptions.CalledModuleError: Module run None r.what --q map=dummy output=- separator=| ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

The reason is this call:

r_what = gcore.read_command("r.what", map="dummy",

which needs to be rewritten.

@neteler neteler added the bug Something isn't working label Mar 24, 2021
@neteler
Copy link
Member Author

neteler commented Oct 28, 2022

Bug still confirmed in GRASS 8.2.1dev

@petrasovaa
Copy link
Contributor

This was fixed in #812, or is still something wrong with it?

@neteler
Copy link
Member Author

neteler commented Nov 9, 2022

You are right, I must have had an outdated addon version installed.

GRASS nc_spm_08_grass7/user1:testsuite > python test_whatcsv.py
1|115.0043586274|36.3593955783||100
2|79.6816763826|45.2391522853||200
3|97.4892579600|79.2347263950||300
4|115.0043586274|36.3593955783||400


.
----------------------------------------------------------------------
Ran 1 test in 5.480s
OK

@neteler neteler closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants