jonas
jonas

Reputation: 380

can't read .dbt file: Unknown dbf type

I get following error when I try to read a .dbt file with this library.

import dbf

table = dbf.Table(filename='test.dbt')
table.open(dbf.READ_ONLY)

>>dbf.DbfError: Unknown dbf type: 16 (10)

You can find the example data here.

Upvotes: 0

Views: 262

Answers (1)

Ethan Furman
Ethan Furman

Reputation: 69051

The .dbt is the memo file, and cannot be opened separately from the .dbf file. What you need to do is

table = dbf.Table(filename='test.dbf')

and the fields stored in the .dbt file will automatically be available.

Upvotes: 1

Related Questions