[GRASS-dev] [GRASS GIS] #2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
-----------------------+----------------------------------------------------
Reporter: jamesp670 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
-----------------------+----------------------------------------------------
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.
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521&gt;
GRASS GIS <http://grass.osgeo.org>

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
-----------------------------+----------------------------------------------
Reporter: jamesp670 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-releasebranch70
Keywords: d.vect.thematic | Platform: Linux
      Cpu: x86-64 |
-----------------------------+----------------------------------------------
Changes (by martinl):

  * keywords: => d.vect.thematic
  * component: Vector => Display

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
-----------------------------+----------------------------------------------
Reporter: jamesp670 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-releasebranch70
Keywords: d.vect.thematic | Platform: Linux
      Cpu: x86-64 |
-----------------------------+----------------------------------------------

Comment(by martinl):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
-----------------------------+----------------------------------------------
Reporter: jamesp670 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-releasebranch70
Keywords: d.vect.thematic | Platform: Linux
      Cpu: x86-64 |
-----------------------------+----------------------------------------------

Comment(by martinl):

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).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
------------------------+---------------------------------------------------
  Reporter: jamesp670 | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-releasebranch70
Resolution: fixed | Keywords: d.vect.thematic
  Platform: Linux | Cpu: x86-64
------------------------+---------------------------------------------------
Changes (by martinl):

  * status: new => closed
  * resolution: => fixed

Comment:

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2521: d.vect.thematic, "Neither MONITOR (managed by d.mon command) nor" error
------------------------+---------------------------------------------------
  Reporter: jamesp670 | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-releasebranch70
Resolution: fixed | Keywords: d.vect.thematic
  Platform: Linux | Cpu: x86-64
------------------------+---------------------------------------------------

Comment(by wenzeslaus):

Replying to [comment:2 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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2521#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>