error when driver db3 tries to add a field to a dbf from a shapefile having fields of 24 digits

34 views
Skip to first unread message

Yann Chemin

unread,
Sep 19, 2016, 11:24:32 AM9/19/16
to Python dBase
Hi,

I am simply trying to add a field to a dbf file having fields of 24-digits. it warns about 1 to 19 digits restriction of the db3 driver.

is there a way to let it be peaceful about it and just add that new field?

I cannot control the incoming file, i can only work with it.

Thanks,
Yann

-----
import dbf
dbf.add_fields('blabla.dbf', 'newf N(12.8)')
-----

Ethan Furman

unread,
Sep 19, 2016, 11:32:03 AM9/19/16
to python...@googlegroups.com
On 09/19/2016 05:48 AM, Yann Chemin wrote:

> I am simply trying to add a field to a dbf file having fields of 24-digits. it warns about 1 to 19 digits restriction of the db3 driver.
>
> is there a way to let it be peaceful about it and just add that new field?

Not at this point.

> I cannot control the incoming file, i can only work with it.

Can you send an example piece of the file?

> -----
> import dbf
> dbf.add_fields('blabla.dbf', 'newf N(12.8)')
> -----

This example is creating a 12-character wide field, not 24.

--
~Ethan~
Reply all
Reply to author
Forward
0 new messages