You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
i feel confused with this part of code in file dbfpy/header.py, line 160
if pos != field.start:
raise ValueError(
'dbf fields definition is corrupt, '
'fields start does not match.'
)
using a dbase file, it returns another number, so i reviewed your dbf files included in your test folder, i saw the dbf is of Visual Foxpro right?.
I tried my own test with a dbase file, and the field.start is set with 1271005187, so in the if statement it return me a raise statement, if commented the statement does not retrieve the values of the fields because i guess the position is important to retrieve the right value, for that reason only commented the raise statement and i set the field.start with the pos variable and it works.
>>> string=b'NORMAL\x00\x00\x00\x00\x00N\x03\x00\xc2K\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
>>> struct.unpack('< 11s c I 3B I B', string[:24])
(b'NORMAL\x00\x00\x00\x00\x00', b'N', 1271005187, 4, 0, 0, 256, 0)
Well the way to solve my problem is it:
if pos != field.start:
field.start = pos
"""
raise ValueError(
'dbf fields definition is corrupt, '
'fields start does not match.'
)
"""
i tested with the table.dbf and it works, so maybe you can include this change, to make compatible with dbf from dbase III and Visual Foxpro because the variable pos did set fine.
The text was updated successfully, but these errors were encountered:
Hi Steelwing,
i feel confused with this part of code
in file dbfpy/header.py, line 160
using a dbase file, it returns another number, so i reviewed your dbf files included in your test folder, i saw the dbf is of
Visual Foxpro
right?.I tried my own test with a dbase file, and the field.start is set with 1271005187, so in the if statement it return me a raise statement, if commented the statement does not retrieve the values of the fields because i guess the position is important to retrieve the right value, for that reason only commented the raise statement and i set the field.start with the pos variable and it works.
Well the way to solve my problem is it:
i tested with the table.dbf and it works, so maybe you can include this change, to make compatible with dbf from
dbase III and Visual Foxpro
because the variablepos
did set fine.The text was updated successfully, but these errors were encountered: