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

KeyError: 'oauth_token' #2

Open
shawnhind opened this issue Oct 1, 2014 · 11 comments
Open

KeyError: 'oauth_token' #2

shawnhind opened this issue Oct 1, 2014 · 11 comments

Comments

@shawnhind
Copy link

When I try to use your library I get that error. I may be using it incorrectly but I followed your instructions.

I imported YHandler.py
I created a YHandler object
I called object.call_api(URI)
I get that key error

@mleveck
Copy link
Owner

mleveck commented Oct 1, 2014

I'll try to look into this. It could be that one of the libraries used has changed it's api. Or could be something else. What kind of app are you trying to use this in? Desktop? Web?

@shawnhind
Copy link
Author

Well I was trying to use it in a web app for pulling basic sports data through the Yahoo API. Am I using it correctly? Do I have to call any of the other functions before calling object.call_api('URI'). What is the difference between call_api and api_req. Which one should I use? From the looks of it call_api just turns in the query string into a full URI?

@mleveck
Copy link
Owner

mleveck commented Oct 1, 2014

It's not set up out of the box for webapps. It's set up for a command line
client. You'll notice it using OOB for the intermediate token step.
On Oct 1, 2014 3:10 PM, "Shawn Hind" [email protected] wrote:

Well I was trying to use it in a web app for pulling basic sports data
through the Yahoo API. Am I using it correctly? Do I have to call any of
the other functions before calling object.call_api('URI'). What is the
difference between call_api and api_req. Which one should I use? From the
looks of it api_req just turns in the query string into a full URI?


Reply to this email directly or view it on GitHub
#2 (comment).

@shawnhind
Copy link
Author

Now it appears to be a different issue when I try using it with api_req and a query string:
Below has my test code and my error message.
http://pastebin.com/fviZig5z

@shawnhind
Copy link
Author

Well I mean I'm planning on using it in a web app but I'm currently messing around with it in a desktop program.

@mleveck
Copy link
Owner

mleveck commented Oct 1, 2014

Ok. I'll take a look when I can then. Unfortunately with my job, that
probably won't be until Saturday. If you find the bug before then, feel
free to submit a patch.
On Oct 1, 2014 3:20 PM, "Shawn Hind" [email protected] wrote:

Well I mean I'm planning on using it in a web app but I'm currently
messing around with it in a desktop program.


Reply to this email directly or view it on GitHub
#2 (comment).

@shawnhind
Copy link
Author

Am I using it correctly though from what you see?

@mleveck
Copy link
Owner

mleveck commented Oct 1, 2014

Assuming you correctly set up the author.csv , that looks right.
On Oct 1, 2014 3:24 PM, "Shawn Hind" [email protected] wrote:

Am I using it correctly though from what you see?


Reply to this email directly or view it on GitHub
#2 (comment).

@sheepeatingtaz
Copy link

I just started using this for the same sort of thing as Hinds and also get the error regarding 'pre-request'

@sheepeatingtaz
Copy link

Looks like it's a problem with requests-oauth and the version of requests: maraujop/requests-oauth#42

I haven't tried, but there is a workaround listed that I will have a go at later

@cllin
Copy link

cllin commented Nov 9, 2014

A work-around is to use older version of Request. version 0.14.0 works for me.

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

4 participants