Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_lists failes with invalid response #2

Closed
tobiasli opened this issue Nov 29, 2015 · 3 comments
Closed

get_lists failes with invalid response #2

tobiasli opened this issue Nov 29, 2015 · 3 comments

Comments

@tobiasli
Copy link

Hi there!

I've fixed the relative imports, but have stumbled upon something else. I don't know if i've set things up correctly.

I'm still running Python 3.4 on a clean windows machine. With a fresh client_id and access token from https://developer.wunderlist.com/apps.

Trying to get lists, I consistently get an invalid response:

import wunderpy2
api = wunderpy2.WunderApi()
client = api.get_client(access_token, client_id)
client.get_lists()
Traceback (most recent call last):
  File "<string>", line 293, in runcode
  File "<interactive input>", line 1, in <cmodule>
  File "D:\path\wunderpy2\wunderpy2\wunderclient.py", line 49, in get_lists
    return lists_endpoint.get_lists(self)
  File "D:\path\wunderpy2\wunderpy2\lists_endpoint.py", line 11, in get_lists
    response = client.authenticated_request(client.api.Endpoints.LISTS)
  File "D:\path\wunderpy2\wunderpy2\wunderclient.py", line 45, in authenticated_request
    return self.api.request(endpoint, method=method, headers=headers, params=params, data=data)
  File "D:\path\wunderpy2\wunderpy2\wunderapi.py", line 76, in request
    self._validate_response(method, response)
  File "D:\path\wunderpy2\wunderpy2\wunderapi.py", line 40, in _validate_response
    raise ValueError('{} {}'.format(response.status_code, str(response.json())))
ValueError: 400 {'invalid_request': True}

Debug stop shows no response from https://a.wunderlist.com/api/v1/lists.

@mieubrisse
Copy link
Owner

Taking a look at this now.

@mieubrisse
Copy link
Owner

I can't seem to replicate this using Python 3.4.4. Are you sure your access token and client ID are correct/not swapped?

@mieubrisse
Copy link
Owner

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants