[GRASS-dev] [GRASS GIS] #2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------
In freshly updated and compiled trunk and release70, I get the following
error when I

  * open the v.external wizard in wxGUI
  * chose Database as 'Type of source'
  * chose PostgreSQL as 'Format'
  * chose a PostGIS database

{{{
Traceback (most recent call last):
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/gselect.py", line
1362, in <lambda>

lambda evt:
self.SetSourceType(self.sourceMapByIdx[evt.GetInt()]))
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/gselect.py", line
1767, in SetSourceType

self._reloadLayers()
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/gselect.py", line
1945, in _reloadLayers

layerName, featureType, projection, geometryColumn =
map(lambda x: x.strip(), line.split(','))
ValueError
:
need more than 3 values to unpack
}}}

This is on Debian Testing.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by annakrat):

What do you get when you run v.external like this?

{{{
v.external -t --quiet input=...
}}}

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by mlennert):

Replying to [comment:1 annakrat]:
> What do you get when you run v.external like this?
>
> {{{
> v.external -t --quiet input=...
> }}}

{{{
v.external input=PG:dbname=amadeus -t
PostGIS database <amadeus> contains 10 feature tables:
fr.commune,multipolygon,0
gis.be_communes,multipolygon,0
gis.fr_communes,multipolygon,0
gis.fr_nace332,point,0
gis.fr_nace332,point,0
gis.nace26,point,0
gis.nuts2,multipolygon,0
amadeus_extract,point,0
amadeus_extract,point,0
test_grass,point,0
}}}

The problem does not seem to be v.external, but the wizard. I get a
similar error when I try to import a database table via the v.in.ogr
wizard.

However, I don't see this in grass7release anymore... I guess it's just
Friday afternoon and I'm a bit tired from the week :wink:

I'll recheck all of this on Monday the latest...

Moritz

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by annakrat):

It's somehow related to http://trac.osgeo.org/grass/changeset/63610 which
hasn't been backported. v.external is running in the background and the
code expects 4 columns (`layerName, featureType, projection,
geometryColumn`) but you get only 3.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by martinl):

Replying to [comment:3 annakrat]:
> It's somehow related to http://trac.osgeo.org/grass/changeset/63610
which hasn't been backported. v.external is running in the background and
the code expects 4 columns (`layerName, featureType, projection,
geometryColumn`) but you get only 3.

I have backport it in r64041.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned

Comment:

Replying to [comment:4 martinl]:
> Replying to [comment:3 annakrat]:
> > It's somehow related to http://trac.osgeo.org/grass/changeset/63610
which hasn't been backported. v.external is running in the background and
the code expects 4 columns (`layerName, featureType, projection,
geometryColumn`) but you get only 3.
>
> I have backport it in r64041.

There are more issues to fix/backport, I will take a look later.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by mlennert):

Replying to [comment:4 martinl]:
> Replying to [comment:3 annakrat]:
> > It's somehow related to http://trac.osgeo.org/grass/changeset/63610
which hasn't been backported. v.external is running in the background and
the code expects 4 columns (`layerName, featureType, projection,
geometryColumn`) but you get only 3.
>
> I have backport it in r64041.

FYI: it was working in release70 and not in trunk, so I guess by
backporting it will now also not work in release70... I can't check right
now, so this message is meant just to give you a heads up.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by mlennert):

Replying to [comment:6 mlennert]:
> Replying to [comment:4 martinl]:
> > Replying to [comment:3 annakrat]:
> > > It's somehow related to http://trac.osgeo.org/grass/changeset/63610
which hasn't been backported. v.external is running in the background and
the code expects 4 columns (`layerName, featureType, projection,
geometryColumn`) but you get only 3.
> >
> > I have backport it in r64041.
>
> FYI: it was working in release70 and not in trunk, so I guess by
backporting it will now also not work in release70... I can't check right
now, so this message is meant just to give you a heads up.

I can confirm now that v.external does not work for PostgreSQL databases
in trunk and grass70. v.external -t still gives me the same output.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by martinl):

I fixed v.external in r64098 and backported fix to relbr70 in r64099.
Testing welcome before closing this ticket.

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
----------------------------------+-----------------------------------------
Reporter: mlennert | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.external postresql | Platform: Linux
      Cpu: Unspecified |
----------------------------------+-----------------------------------------

Comment(by mlennert):

Replying to [comment:8 martinl]:
> I fixed v.external in r64098 and backported fix to relbr70 in r64099.
Testing welcome before closing this ticket.

Works for me now in trunk and relbr70. Thanks !

Moritz

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

#2537: v.external wxgui wizard: ValueError : need more than 3 values to unpack
-----------------------+----------------------------------------------------
  Reporter: mlennert | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: v.external postresql
  Platform: Linux | Cpu: Unspecified
-----------------------+----------------------------------------------------
Changes (by martinl):

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

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