Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2521 closed defect (fixed)

d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error

Reported by: jamesp670 Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Display Version: svn-releasebranch70
Keywords: d.vect.thematic Cc:
CPU: x86-64 Platform: Linux

Description

What I expect:

My d.vect.thematic command,

d.vect.thematic -f -s --verbose map=tract2010censusdp1_clipped_02@PERMANENT column=popden10 themetype=graduated_colors themecalc=custom_breaks breakpoints="0 500 1000 1500 2000 5000 10000 1500\
0 20000 25000" colorscheme=green-red monitor=none -u

should work.

What happens:

GRASS 7.0.0svn (rlis-master-for-seven):~/projects/grass70_release > !d.vect
d.vect.thematic -f -s --verbose map=tract2010censusdp1_clipped_02@PERMANENT column=popden10 themetype=graduated_colors themecalc=custom_breaks breakpoints="0 500 1000 1500 2000 5000 10000 1500\
0 20000 25000" colorscheme=green-red monitor=none -u

Thematic map legend for column popden10 of map
tract2010censusdp1_clipped_02@PERMANENT
Value range: 0.0 - 0.0103575
Color(R:G:B)  Value
============  ==========
0:255:0   0 - 25000 
ERROR: Neither MONITOR (managed by d.mon command) nor
       GRASS_RENDER_IMMEDIATE (used for direct rendering) defined
^GTraceback (most recent call last):
  File "/opt/yum-packages-installed-on-the-head-node/tmp/local/grass-7.0.0svn/scripts/d.vect.thematic", line 1105, in <module>
    main()
  File "/opt/yum-packages-installed-on-the-head-node/tmp/local/grass-7.0.0svn/scripts/d.vect.thematic", line 733, in main
    color = linecolor, fcolor = themecolor, icon = icon, size = ptsize)
  File "/opt/yum-packages-installed-on-the-head-node/tmp/local/grass-7.0.0svn/etc/python/grass/script/core.py", line 373, in run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/opt/yum-packages-installed-on-the-head-node/tmp/local/grass-7.0.0svn/etc/python/grass/script/core.py", line 308, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['d.vect', 'map=tract2010censusdp1_clipped_02@PERMANENT', 'layer=1', 'fcolor=0:255:0', 'color=none', 'type=area', 'icon=basic/circle', 'wher\
e=popden10 >= 0 AND popden10 <= 25000', 'size=5.0'] ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

Change History (5)

comment:1 by martinl, 10 years ago

Component: VectorDisplay
Keywords: d.vect.thematic added

comment:2 by martinl, 10 years ago

You need to enable direct rendering (1) or start graphic monitor (2) to use d.vect.thematic. Now the module prints the error message without traceback:

d.vect.thematic obce_polygon column=statuskod
ERROR: Neither MONITOR (managed by d.mon command) nor GRASS_RENDER_IMMEDIATE (used for direct rendering) defined)

Start monitor:

d.mon wx0

or file-based, eg.

d.mon cairo out=thematic.png
d.vect.thematic obce_polygon column=statuskod

(1) http://grass.osgeo.org/grass71/manuals/variables.html#list-of-selected-grass-environment-variables-for-rendering (2) http://grass.osgeo.org/grass71/manuals/d.mon.html

comment:3 by martinl, 10 years ago

BTW, I fixed a lot of issues in r63904. Also -u flag is now rgb_column option (similary to other modules like v.colors and d.vect).

comment:4 by martinl, 10 years ago

Resolution: fixed
Status: newclosed

I am taking liberty to close this ticket. Please reopen if needed.

in reply to:  2 comment:5 by wenzeslaus, 10 years ago

Replying to martinl:

You need to enable direct rendering (1) or start graphic monitor (2) to use d.vect.thematic.

I think that the error message is quite informative but it seems that without documenting this behavior, people just consider this as an bug rather than wrong usage of interface.

Note: See TracTickets for help on using tickets.