Open tbadams45 opened 9 years ago
Do you still see the problem? Looks like the dateutil parser is failing to handle the UTC time returned by Todoist. Quite possible this was a temporary issue that has now been fixed by them, but if you still see it then seeing the contents of that attribute should make it obvious what is wrong.
Attempted to run NextAction, had latest version of dateutil installed. Got "AttributeError: 'str' object has no attribute 'read'", root cause in the parser.py file from dateutil. Not really sure what to make of this, but would appreciate any help as it's preventing me from using your fantastic script.
Here's the error info I received:
INFO:root:Found next_action label, id: 766068 DEBUG:root:pushing "1 - Solar: Research yieldcos" on the parent stack beneath "1 - Solar: Research yieldcos" DEBUG:root:adding item "Review Sun Edison reports Finny sent re: yieldcos" with parent "1 - Solar: Research yieldcos" DEBUG:root:pushing "Ministry - Far" on the parent stack beneath "Ministry - Far" DEBUG:root:adding item "Hit Kevin up - when's a time we can skype in the next 3 weeks?" with parent "Ministry - Far" DEBUG:root:adding item "Call Jeff" with parent "Ministry - Far" Traceback (most recent call last): File "nextaction.py", line 375, in
main()
File "nextaction.py", line 357, in main
a = TodoistData(initial_data)
File "nextaction.py", line 212, in init
project.BuildItemTree()
File "nextaction.py", line 179, in BuildItemTree
item = Item(item_dict)
File "nextaction.py", line 58, in init
self.due_date_utc = p.parse(initial_data['due_date_utc'])
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 392, in parse
res = self._parse(timestr, kwargs)
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 492, in _parse
l = _timelex.split(timestr) # Splits the timestr into tokens
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 174, in split
return list(cls(s))
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 171, in next
return self.next() # Python 2.x support
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 164, in next**
token = self.get_token()
File "c:\Python27\lib\site-packages\dateutil\parser.py", line 82, in get_token
nextchar = self.instream.read(1)
AttributeError: 'str' object has no attribute 'read'