Opened 5 years ago

Closed 5 years ago

#2537 closed defect (fixed)

v.external wxgui wizard: ValueError : need more than 3 values to unpack

Reported by: mlennert Owned by: martinl
Priority: normal Milestone: 7.0.0
Component: wxGUI Version: svn-trunk
Keywords: v.external postresql Cc: grass-dev@…
CPU: Unspecified Platform: Linux

Description

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.

Change History (10)

comment:1 in reply to:  description ; Changed 5 years ago by annakrat

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

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

comment:2 in reply to:  1 Changed 5 years ago by mlennert

Replying to 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 ;-)

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

Moritz

comment:3 Changed 5 years ago 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.

comment:4 in reply to:  3 ; Changed 5 years ago by martinl

Replying to 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.

comment:5 in reply to:  4 Changed 5 years ago by martinl

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

Replying to martinl:

Replying to 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.

comment:6 in reply to:  4 ; Changed 5 years ago by mlennert

Replying to martinl:

Replying to 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.

comment:7 in reply to:  6 Changed 5 years ago by mlennert

Replying to mlennert:

Replying to martinl:

Replying to 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.

comment:8 Changed 5 years ago by martinl

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

comment:9 in reply to:  8 Changed 5 years ago by mlennert

Replying to 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

comment:10 Changed 5 years ago by martinl

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.