hportlock / todoutil

Python utility to upload todo.txt files to todoist
3 stars 0 forks source link

Script is broken; Todoist API no longer available #1

Open JonathanReeve opened 7 years ago

JonathanReeve commented 7 years ago

The script fails with:

Traceback (most recent call last):
  File "./todoutil.py", line 19, in <module>
    send_to_todoist(api_token, path)
  File "./todoutil.py", line 8, in send_to_todoist
    apiHelper = TodoistApiHelper(api_token)
  File "/home/jon/Apps/todoutil/todoist.py", line 10, in __init__
    response = get_todoist(api_token, 'getProjects')
  File "/home/jon/Apps/todoutil/todoist.py", line 72, in get_todoist
    return r.json()
  File "/home/jon/.virtualenvs/todoutil/lib/python2.7/site-packages/requests/models.py", line 799, in json
    return json.loads(self.text, **kwargs)
  File "/usr/lib64/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

If you look into the responses it's getting, the response from the URL that the script tries to access is:

This API endpoint is no longer available. Please upgrade your client to the latest API version: https://developer.todoist.com

hportlock commented 7 years ago

Thanks for the bug report. I'm not sure when I'll be able to get around to fixing this, but I'll try to look into it sometime soon.