Hello,
I'm new in this group, but I hope you don't mind I'm immediately asking questions.
In my recent project I have to integrate my software to a Visual FoxPro 9 application, so I just exploring the use of this library.
Although in the documentation it says that this library only support Visual FoxPro 6, I'm wondering what is the format difference between
6 and 9, and what is the potential problem if I use this library anyway.
And the second question is I come across this exception in one of the tables:
array('c', '\x07')
8
1 0
686 array('c', ' \x07')
('0', 685, 1, 686, 0, 5, <function none at 0xf69f50>, <function none at 0xf69f50>)
array('c', '\x07')
Traceback (most recent call last):
File "reader.py", line 10, in <module>
print record
File "/home/mobile04/src/db/dbf.py", line 1796, in __str__
result.append("%3d - %-10s: %r" % (seq, field, self[field]))
File "/home/mobile04/src/db/dbf.py", line 1732, in __getitem__
return self.__getattr__(item)
File "/home/mobile04/src/db/dbf.py", line 1701, in __getattr__
value = self._retrieve_field_value(index, name)
File "/home/mobile04/src/db/dbf.py", line 1871, in _retrieve_field_value
if ord(null_data[byte]) >> bit & 1:
IndexError: array index out of range
I'm using the latest version of the library (0.94.005), it happens when I'm trying to read a table using VfpTable and print the record.
I couldn't yet figured out what "if ord(null_data[byte]) >> bit & 1" does, so I need some clue here understand what's happening.
The code works for other tables in the same software though, so may be there's something specific in this table.