On 08/10/2017 10:10 AM, Aaron Weisberg wrote:
> Ive been banging my head against a wall for two days and figured one of the pros could help me. I'm trying to take several .DBF from a proprietary program and turn the relate the data to .CSV with Python. However, some of the files are not cooperating with me and send me an error:
>
> site-packages\dbfread\dbf.py", line 224, in _read_field_headers
> field = DBFField.unpack(sep + infile.read(DBFField.size - 1))
> "in unpack items = zip(self.names, self.struct.unpack(data)) struct.error: unpack requires a bytes object of length 32"
>
>
> My code is simply:
> table = DBF('AR.DBF', load = True)
I'm not sure which module/library you are using, but it's not this one (which can be found at
https://pypi.python.org/pypi/dbf).
If you want to try with the dbf library, I'm sure someone here can help with any questions.
--
~Ethan~