Opened 10 years ago

Closed 10 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)

in reply to:  description ; comment:1 by annakrat, 10 years ago

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

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

in reply to:  1 comment:2 by mlennert, 10 years ago

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 by annakrat, 10 years ago

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.

in reply to:  3 ; comment:4 by martinl, 10 years ago

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.

in reply to:  4 comment:5 by martinl, 10 years ago

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.

in reply to:  4 ; comment:6 by mlennert, 10 years ago

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.

in reply to:  6 comment:7 by mlennert, 10 years ago

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 by martinl, 10 years ago

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

in reply to:  8 comment:9 by mlennert, 10 years ago

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 by martinl, 10 years ago

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