[GRASS-dev] [GRASS GIS] #2547: v.report: should report stats even if there is no attribute table (or at least fail more gracefully)
GRASS GIS
trac at osgeo.org
Tue Jan 13 05:29:17 PST 2015
#2547: v.report: should report stats even if there is no attribute table (or at
least fail more gracefully)
-----------------------------------------------------+----------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Keywords: v.report vector_columns attribute table | Platform: Unspecified
Cpu: Unspecified |
-----------------------------------------------------+----------------------
{{{
v.net input=streets_wake points=schools_wake output=network
operation=connect threshold=500
v.net.alloc input=network output=alloc center_cats=1-9999
v.report alloc op=lengthTraceback (most recent call last):
File "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64-unknown-
linux-gnu/scripts/v.report", line 185, in <module>
main()
File "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64-unknown-
linux-gnu/scripts/v.report", line 70, in main
colnames = grass.vector_columns(mapname, layer, getDict = False,
stderr = nuldev)
File "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64-unknown-
linux-gnu/etc/python/grass/script/vector.py", line 120, in vector_columns
**args)
File "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64-unknown-
linux-gnu/etc/python/grass/script/core.py", line 427, in read_command
return handle_errors(returncode, stdout, args, kwargs)
File "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64-unknown-
linux-gnu/etc/python/grass/script/core.py", line 310, in handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['v.info', '--q',
'-c', 'map=alloc', 'layer=1'] ended with error
Process ended with non-zero return code 1. See errors in the (error)
output.
}}}
I think v.report should just report stat by cat in such a case, but at
least there should be a graceful exit explaining that an attribute table
is needed.
I guess this is as much a bug in vector_columns() in grass.script as it is
a bug in v.report...
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2547>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list