I'm working on getting information that comes from a dbf file (database),
this dbf file is related to another file in the system, a shapefile. My code
is trying to get all the dbf name records, but when the systen gets an empty
file, my code fails:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "get_dbf.py", line 32, in <module>
    dbf = Dbf(d,new=False, readOnly=True)
  File "C:\Python26\lib\site-packages\dbf.py", line 135, in __init_
    self.header = self.HeaderClass.fromStream(self.stream)
  File "C:\Python26\lib\site-packages\header.py", line 109, in from
    (_cnt, _hdrLen, _recLen) = struct.unpack("<I2H", _data[4:12])
struct.error: unpack requires a string argument of length 8
>>>
How can I fix it?
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to