[GRASS-user] Inconsistent number of column in the table

Daniel Victoria daniel.victoria at gmail.com
Tue Jul 3 12:39:58 PDT 2018


Hi list,

Sorry to resurface an old problem. At the time I was able to 'circle
around' this 'inconsistent number of column' issue. But now it came back
(like all good problems do).

Anyway, I imported a large soil map with v.in.ogr, whitout errors. But when
I try to open the attribute table (Show attribute table in GUI dialog), I
get an error saying "Inconsistent number of column in the table". The
Attribute table manager then opens but I can't browse the data.

v.db.select on the CLI works fine so I suspect it's a problem with special
characters in the attribute table messing up with the attribute table GUI.

The data has lots of special characters (accents) and they show up fine in
v.db.select. But I suspect the main problem is that the attribute table has
line breaks! Yes, someone has placed line brakes in the attribute table.
Yikes...

Any idea how to clean this attribute table? The only thing I could think of
is opening the shapefile in R or Python and try to substitute the "\n"
character.

Cheers
Daniel

On Tue, Jan 16, 2018 at 10:13 PM Daniel Victoria <daniel.victoria at gmail.com>
wrote:

> That is probably the case.
> Is there a way to 'sanitize' this shapefile DBF prior to v.in.ogr?
>
> Or the fact that v.db.select works on the CLI means that the attribute
> table is OK. It's more a visualization problem with the GUI attribute table
> manager.
>
> Thanks
> Daniel
>
>
> On Tue, Jan 16, 2018 at 6:15 PM Helmut Kudrnovsky <hellik at web.de> wrote:
>
>> DanielV wrote
>> > Hi List,
>> >
>> > I imported a large vector shapefile into grass. v.in.ogr did not report
>> > any
>> > errors. However, when I try to open the attribute table (Show attribute
>> > table in GUI dialog), I get an error saying "Inconsistent number of
>> column
>> > in the table". The Attribute table manager then opens but I can't browse
>> > the data. However, table is correctly described (column names and data
>> > type).
>> >
>> > From the CLI, v.db.select will print the contents of the attribute table
>> > without any complains.
>> >
>> > Any idea how to troubleshoot this?
>>
>> are there any special characters in the table content, e.g. ' or " or ;
>> or ,
>> or / or \ .... etc?
>>
>>
>>
>> -----
>> best regards
>> Helmut
>> --
>> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180703/92468067/attachment.html>


More information about the grass-user mailing list