Code Monkey home page Code Monkey logo

nextaction's People

Contributors

akramer avatar iggyvolz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nextaction's Issues

API Issue? Key error accessing 'last_updated'

http://todoist.com/Support/show/69610/

The script was was working two or so days ago before the big update, but now nextaction.py fails when it tries to look up the 'last_updated' key from the API.

Relevant lines:

response = GetResponse(args.api_token)
#Result of: urllib2.urlopen(urllib2.Request('https://api.todoist.com/TodoistSync/v5.3/get', data)) with {api_token, seq_no: 0} urllib.urlencoded().
initial_data = response.read()
initial_data = json.loads(initial_data)
a = TodoistData(initial_data)
.
.
# TodoistData(object): 
# def __init__(self, initial data):
.
.
for project in initial_data['Projects']:
     if project['is_deleted'] == 0:
          self._projects[project['id']] = Project(project)

# Inside the Project(object) 
# __init__(self, initial_data):
.
.
self.last_updated = initial_data['last_updated']

This line throws a KeyError: on 'last_updated'.

Any ideas on what the issue is?

'str' object has no attribute read

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'

HTTP error 403

Features on Youtube demo are great.

When I run the script I get an error. I am running arch linux x86_64. Token is in the script and I have premium version of todoist.

Error:
Traceback (most recent call last):
File "./nextaction.py", line 335, in
main()
File "./nextaction.py", line 314, in main
response = GetResponse()
File "./nextaction.py", line 292, in GetResponse
return urllib2.urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.