ddksr / cliist

Todoist commandline client
111 stars 12 forks source link

Error connecting to Todoist API #17

Open samspo opened 8 years ago

samspo commented 8 years ago

Hello,

Config: OSX 10.11 premium todoist account I used the API token in the todoist settings

When I try to execute ./cliist.py, I have the following message:

Traceback (most recent call last):
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/api.py", line 21, in api_call
    req = urllib.request.urlopen(url)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/cliist.py", line 5, in <module>
    from lib import process, output, cache
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/process.py", line 3, in <module>
    from lib import todoist, output
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/todoist.py", line 4, in <module>
    from . import models, output
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/models.py", line 188, in <module>
    projects_dict = ProjectDict()
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/models.py", line 185, in __init__
    for project in api.api_call('getProjects'):
  File "/Users/sam/Dropbox/Workflow/Tech/cliist/lib/api.py", line 25, in api_call
    raise CliistException('Error connecting to Todoist API')
lib.utils.CliistException: Error connecting to Todoist API

What should I do? Where is my mistake?

Thanks,

ddksr commented 8 years ago

Hi, looks like the totoist api was replaced.

will work into updating the code to support the new one

tnx for the detailed report!

samspo commented 8 years ago

Thx for the follow up.

ygorduraes-old commented 7 years ago

Same problem here, waiting for the update (:

lawrenceadams commented 7 years ago

Looking forward to it! Thanks

kaushalmodi commented 7 years ago

Stumbled across the same issue.

chadfrost commented 7 years ago

Ditto. The Todoist API is now at v7, from looking at the codebase it's a pretty substantial shift. There is an official todoist api python library (https://developer.todoist.com/?python#client-libraries) that is probably the best starting point to update the cli interface.