From a1e2f3e78c7a5e31aaa2c1e190798763fd5a55e5 Mon Sep 17 00:00:00 2001 From: Warren Kumari Date: Thu, 29 Nov 2018 18:25:29 -0500 Subject: [PATCH] Apparently at some point the response was updated to include: true This would make: time.strptime(self._current_content, '%H:%M:%S')[3:6]) fail with "ValueError: time data u'true' does not match format '%H:%M:%S'" I'm not sure what else might end with 'time', and so I'm simply excluding is_cal_localtime. --- tripit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tripit.py b/tripit.py index 5de2ace..ee48fd5 100644 --- a/tripit.py +++ b/tripit.py @@ -217,7 +217,7 @@ def endElement(self, name): self._current_content = datetime.date( *(time.strptime( self._current_content, '%Y-%m-%d')[0:3])) - elif name.endswith('time'): + elif name.endswith('time') and not name.endswith('is_cal_localtime'): self._current_content = datetime.time( *(time.strptime( self._current_content, '%H:%M:%S')[3:6]))