[GRASS-dev] [GRASS GIS] #3294: g.gui.tplot: error when trying to plot a STVDS

#3294: g.gui.tplot: error when trying to plot a STVDS
--------------------+-------------------------
Reporter: lrntct | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: 7.2.0
Keywords: | CPU: x86-64
Platform: Linux |
--------------------+-------------------------
When using g.gui.tplot to plot a time-series of a point in a STVDS, I
encounter the following issue:

When selecting the stvds in the GUI, a GUI message appears, saying:

{{{
Invalid input temporal dataset
}}}

And the console displays a message from t.vect.list:

{{{
ERROR: t.vect.list: Sorry, <s> is not a valid flag
}}}

If nonetheless trying to plot a value, the following error message appears
in the console, and nothing is plotted:

{{{
Traceback (most recent call last):
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 759, in
OnRedraw
     self._redraw()
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 770, in
_redraw
     self._getSTVDData(self.datasetsV)
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 480, in
_getSTVDData
     cats = self._getExistingCategories(rows[0]['name'], cats)
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 384, in
_getExistingCategories
     for cat in cats:
TypeError: 'NoneType' object is not iterable
}}}

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

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: 7.2.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------

Comment (by lrntct):

Might be related to [69686]

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

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: 7.2.0
Resolution: fixed | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------
Changes (by neteler):

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

Comment:

Good catch, r69686 now backported in r70648. Thanks!

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

Hello,

Thanks for the fast answer.
I applied the patch, but I get another error when trying to plot the STVDS:

{{{
Traceback (most recent call last):
  File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 759, in OnRedraw
    self._redraw()
  File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 770, in _redraw
    self._getSTVDData(self.datasetsV)
  File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 499, in _getSTVDData
    lay = int(row['layer'])
TypeError: int() argument must be a string or a number, not 'NoneType'
}}}

I don't know if it's related, but my maps have two layers.
t.vect.db.select is working correctly.

Laurent

2017-02-20 13:34 GMT-06:00 GRASS GIS <trac@osgeo.org>:

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: 7.2.0
Resolution: fixed | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------
Changes (by neteler):

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

Comment:

Good catch, r69686 now backported in r70648. Thanks!

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

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: 7.2.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------
Changes (by lrntct):

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

Comment:

After applying the patch, I get another error when trying to plot the
STVDS:

{{{
Traceback (most recent call last):
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 759, in
OnRedraw
     self._redraw()
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 770, in
_redraw
     self._getSTVDData(self.datasetsV)
   File "/usr/lib/grass72/gui/wxpython/tplot/frame.py", line 499, in
_getSTVDData
     lay = int(row['layer'])
TypeError: int() argument must be a string or a number, not 'NoneType'
}}}

The maps inside the STVDS have two layers.

t.vect.db.select is working correctly with that STVDS.

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

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.3
Component: wxGUI | Version: 7.2.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------

Comment (by lucadelu):

In [changeset:"72485" 72485]:
{{{
#!CommitTicketReference repository="" revision="72485"
g.gui.tplot: resolved problem with stdvs when no categories are set, see
#3294
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3294#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.3
Component: wxGUI | Version: 7.2.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------

Comment (by lucadelu):

In [changeset:"72486" 72486]:
{{{
#!CommitTicketReference repository="" revision="72486"
g.gui.tplot: resolved problem with stdvs when no categories are set, see
#3294
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3294#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.3
Component: wxGUI | Version: 7.2.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------

Comment (by lucadelu):

In [changeset:"72490" 72490]:
{{{
#!CommitTicketReference repository="" revision="72490"
g.gui.tplot: resolved problem with stdvs when no categories are set, see
#3294
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3294#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3294: g.gui.tplot: error when trying to plot a STVDS
---------------------+-------------------------
  Reporter: lrntct | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
---------------------+-------------------------
Changes (by veroandreo):

* version: 7.2.0 => svn-trunk
* milestone: 7.2.4 => 7.8.0

Comment:

Changing milestone. I get the last error reported:

{{{
Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 882, in
OnRedraw

self._redraw()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 893, in
_redraw

self._getSTVDData(self.datasetsV)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 566, in
_getSTVDData

lay = int(row['layer'])
TypeError
:
int() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 882, in
OnRedraw

self._redraw()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 893, in
_redraw

self._getSTVDData(self.datasetsV)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/tplot/frame.py", line 566, in
_getSTVDData

lay = int(row['layer'])
TypeError
:
int() argument must be a string or a number, not 'NoneType'
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3294#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>