- attached time.diff
ValueError: timestamp out of range for platform time_t
Issue #5
resolved
We’ve run into this exception with the attached plist, but only on a 32-bit Python.
"ValueError: timestamp out of range for platform time_t”
Here’s one workaround (use timedelta).
https://github.com/obspy/obspy/issues/805#issuecomment-44095353
Comments (5)
-
-
repo owner With the patch applied, I get the following error when running the unit tests:
====================================================================== ERROR: testDatetime (test_write.TestWritePlist) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/andrew/Projects/bitbucket/biplist/tests/test_write.py", line 93, in testDatetime self.roundTrip([now]) File "/Users/andrew/Projects/bitbucket/biplist/tests/test_write.py", line 19, in roundTrip plist = writePlistToString(root, binary=(not xml)) File "/Users/andrew/Projects/bitbucket/biplist/biplist/__init__.py", line 174, in writePlistToString writer.writeRoot(rootObject) File "/Users/andrew/Projects/bitbucket/biplist/biplist/__init__.py", line 500, in writeRoot output = self.writeObject(wrapped_root, output, setReferencePosition=True) File "/Users/andrew/Projects/bitbucket/biplist/biplist/__init__.py", line 699, in writeObject output = self.writeObject(objRef, output, setReferencePosition=True) File "/Users/andrew/Projects/bitbucket/biplist/biplist/__init__.py", line 671, in writeObject timestamp -= apple_reference_date_offset TypeError: unsupported operand type(s) for -=: 'int' and 'datetime.datetime' ----------------------------------------------------------------------
-
- attached time2.diff
Sorry, didn’t handle the encoding case. Patch updated and bonus is the logic comes out cleaner.
-
repo owner - changed status to resolved
Fixes
#5ValueError: timestamp out of range for platform time_t→ <<cset 4f58159ef482>>
-
repo owner This is now in release 0.9 available on PyPi. Thanks!
- Log in to comment
Patch using the suggested strategy. Now loads the attached plist fine on 32-bit python.