[Thuban-list] Opening a dbf
antoniolenton at gmail.com
Tue Jul 22 16:04:45 CEST 2008
On Mon, Jul 21, 2008 at 3:35 PM, mark loyd <loydms at yahoo.com> wrote:
> I am using Thuban version 1.2.1 win32 and get the following error message
> when trying to open a dbf. (this dbf is not part of a shapefile but one that
> i am trying to open so that it may be joined to an attribute table of a
> Traceback (most recent call last):
> File "thuban\buildthuban\out1.pyz/Thuban.UI.mainwindow", line 300, in
> File "thuban\buildthuban\out1.pyz/Thuban.UI.command", line 121, in Execute
> File "thuban\buildthuban\out1.pyz/Thuban.UI.mainwindow", line 1075, in
> File "thuban\buildthuban\out1.pyz/Thuban.UI.mainwindow", line 862, in
> File "thuban\buildthuban\out1.pyz/Thuban.Model.session", line 279, in
> File "thuban\buildthuban\out1.pyz/Thuban.Model.table", line 99, in
> KeyError: 3
> Any help would be greatly appreciated.
The KeyError here seems to be because the DBF you're trying to open
contains boolean columns. Though the C part of dbflib supports
reading and writing booleans, in the Python wrapper code there's only
support for Ints, Doubles and Strings.
I'm not sure if there's a good reason for not doing bools, but it
seems like it's just something nobody ever got round to implementing.
If nobody else is coding it I'll add it to my ToDo list, so stay tuned! :)
> Also, Is there a limit on the size of a dbf that can be opened?
Afaik only relative to the amount of memory on your machine. I've
opened dbfs that were several megas large, but nothing really huge.
> Thank you!
> Mark Loyd
Except - The good guys in software development
More information about the Thuban-list