0
我有一個小腳本,將dbf
文件轉換成mysql
並將它們上傳到數據庫。它在一臺機器上工作正常,但不是另一臺機器。我得到一個NotImplementedError。具有問題python dbf reader:NotImplementedError
代碼片段IM:
from dbf import dbf
db = dbf.Dbf("test.dbf")
for i in db:
print i["One"]
print i["Two"]
回溯:
Traceback (most recent call last):
File "test.py", line 4, in <module>
for i in db:
File "C:\Users\Admin1\Desktop\python\virtual\dbfpy\dbf.py", line 242, in __get
item__
return self.RecordClass.fromStream(self, self._fixIndex(index))
File "C:\Users\Admin1\Desktop\python\virtual\dbfpy\record.py", line 121, in fr
omStream
return cls.fromString(dbf, cls.rawFromStream(dbf, index), index)
File "C:\Users\Admin1\Desktop\python\virtual\dbfpy\record.py", line 140, in fr
omString
[_fd.decodeFromRecord(string) for _fd in dbf.header.fields])
File "C:\Users\Admin1\Desktop\python\virtual\dbfpy\fields.py", line 173, in de
codeFromRecord
return self.decodeValue(self.rawFromRecord(record))
File "C:\Users\Admin1\Desktop\python\virtual\dbfpy\fields.py", line 342, in de
codeValue
raise NotImplementedError
NotImplementedError
他們是否運行不同版本的dbf庫? – 2014-11-06 10:58:45