YHandler
YHandler copied to clipboard
KeyError: 'oauth_token'
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
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?
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?
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 https://github.com/mleveck/YHandler/issues/2#issuecomment-57548961.
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
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.
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 https://github.com/mleveck/YHandler/issues/2#issuecomment-57550625.
Am I using it correctly though from what you see?
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 https://github.com/mleveck/YHandler/issues/2#issuecomment-57551324.
I just started using this for the same sort of thing as Hinds and also get the error regarding 'pre-request'
Looks like it's a problem with requests-oauth and the version of requests: https://github.com/maraujop/requests-oauth/issues/42
I haven't tried, but there is a workaround listed that I will have a go at later
A work-around is to use older version of Request. version 0.14.0 works for me.