Opened 11 years ago

Closed 8 years ago

#2119 closed defect (worksforme)

wxgui: attribute table manager fails with "Inconsistent number of columns in the table"

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.0.5
Component: wxGUI Version: svn-trunk
Keywords: table manager Cc:
CPU: Unspecified Platform: Unspecified

Description

After having filled the attribute table of polygons resulting from segmentation with a whole series of variables, I get the following error when trying to display the attribute table:

"Error in v.db.s..."

and then

"Inconsistent number of columns in the table"

This comes from the test at line 249 in gui/wxpython/dbmgr/base.py. Adding some print statements I can see that while there are 159 columns, the gui only detects 97 fields in the actual record (second to last record of the table).

Using v.db.select from the GUI or at the command line I can see all lines without any problems.

Printing out the record on which the GUI fails, after it went through

record = record.split(fs)

I see the following at the 97th field:

'0.014715{_sep_'

and nothing after that.

All the fields before that are correct.

When I export the file to shp and the reimport it again, I get a similar error, but this time it happens on the last record, record length is 88, and the record in that line is normal, without the '{_sep_'.

I'll attach the shapefile to the ticket.

Any hints ?

Moritz

Change History (6)

comment:1 by mlennert, 11 years ago

Since the shapefile is too big to attach it here, you can get it from:

http://tomahawk.ulb.ac.be:8014/segtest.tgz

Moritz

comment:2 by annakrat, 11 years ago

I didn't have any problems with loading the table in attribute manager, all columns seem to be there. I am running Ubuntu with US locale. The '{__sep__}' is the the separator which is used internally for v.db.select because it's highly improbable that it could appear in the data. Strange is that you can see only a part of the separator without the one curly bracket. Are you running it on Windows?

in reply to:  2 comment:3 by mlennert, 11 years ago

Replying to annakrat:

I didn't have any problems with loading the table in attribute manager, all columns seem to be there. I am running Ubuntu with US locale. The '{__sep__}' is the the separator which is used internally for v.db.select because it's highly improbable that it could appear in the data. Strange is that you can see only a part of the separator without the one curly bracket. Are you running it on Windows?

No, Debian. Locale=fr_BE.UTF-8, but I just tried with setting to C and relaunching the GUI and I get the same error. Also in grass64release.

Moritz

comment:4 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:5 by martinl, 8 years ago

Still an issue?

comment:6 by mlennert, 8 years ago

Resolution: worksforme
Status: newclosed

I don't have the shapefile anymore to test, but I haven't encounted the issue since then, so closing...

Note: See TracTickets for help on using tickets.