-
Notifications
You must be signed in to change notification settings - Fork 39
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
Key Error response['access_token'] before message handled #24
Comments
It looks like you may not be using the latest version of the SDK. I believe the commit 4e4ec5c may have resolved this issue. Can you try pulling the latest and see if you continue to hit the issue? |
Is that the version in PyPi? On Thu, Jan 7, 2016 at 12:14 PM, gravitation1 notifications@github.com
|
Okay this is working better with the manual pull. But it's not what I got from PyPi, so maybe update the packages there? Thanks for the response! |
Hey @paulnurkkala! We just updated the version on PyPI (wepay 0.3.2). Thanks! |
Awesome thank you! On Thu, Jan 7, 2016 at 1:34 PM Amy notifications@github.com wrote:
|
Oauth2: using the getToken method, basically following this tutorial: https://www.wepay.com/developer/overview/build-a-crowdfunding-site
Okay weird title, but hopefully this will help break it down...
I was (stupidly) using an incorrect client ID/secret, and when wepay/api.py, in the get_token function was returning, I was getting a key error on line 126, where it checks to set the self.access_token.
What I'm finding, is that, if there's an error returned by the previous line (self.call), it will not do anything with that error because the code will error out on the response['access_token'] because 'access_token' won't be set when the code errors out.
Here are a couple screenshots because I'm not great at explaining: http://imgur.com/a/oKcnJ/all
Swapping that line to: self.access_token = response.get('access_token', None)
clears the keyerror, but doesn't do much in terms of helping you know wthat there's a problem. BUT the error is at least there in the response.
So.. yeah. Just some thoughts. I can make a PR for that if you want, or you can just try it out and test it ourself.
The text was updated successfully, but these errors were encountered: