From: SourceForge.net <no...@so...> - 2011-08-15 13:58:00
|
Bugs item #3391899, was opened at 2011-08-15 14:14 Message generated for change (Comment added) made by styriker You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=746843&aid=3391899&group_id=140566 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: Roland B*atz (styriker) Assigned to: Nobody/Anonymous (nobody) Summary: Error description Initial Comment: Hi, I'm using dbipy and thank you for creating it! It is very helpful! I encountered one wrong error message when I wanted to open the file even though it was not closed before. Maybe it could help modifying the error message to trace down that the file was not closed before. The error message I got was the following: Traceback (most recent call last): File "dbfP1.py", line 225, in <module> newDBF = dbf.Dbf("new.dbf") File "/usr/local/lib/python2.7/dist-packages/dbfpy/dbf.py", line 135, in __init__ self.header = self.HeaderClass.fromStream(self.stream) File "/usr/local/lib/python2.7/dist-packages/dbfpy/header.py", line 120, in fromStream (_year, ord(_data[2]), ord(_data[3]))) File "/usr/local/lib/python2.7/dist-packages/dbfpy/header.py", line 89, in __init__ self.lastUpdate = getDate(lastUpdate) File "/usr/local/lib/python2.7/dist-packages/dbfpy/utils.py", line 75, in getDate return datetime.date(*date[:3]) ValueError: month must be in 1..12 Well, thanks for considering my request. I'm just a newbie in python, so sorry for additional work. Best regards, Roland ---------------------------------------------------------------------- >Comment By: Roland B*atz (styriker) Date: 2011-08-15 15:57 Message: Hi Alex, thank you for your quick response! I attached the dbf used and the python code. In fact I made the file myself. I did not consider using a header so far. The dbf is part of a shapefile. Roland ---------------------------------------------------------------------- Comment By: alexander smishlajev (a1s) Date: 2011-08-15 15:20 Message: Your dbf file seems to have invalid header. If the file is produced by one of the xBases (such as dBase, Clipper or FoxPro), please provide the file itself and tell how did you make this dbf. If the file was made by some other software, please contact the vendor of that software. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=746843&aid=3391899&group_id=140566 |