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

Exception when call get_access_token #4

Closed
7being opened this issue Oct 13, 2009 · 7 comments
Closed

Exception when call get_access_token #4

7being opened this issue Oct 13, 2009 · 7 comments

Comments

@7being
Copy link

7being commented Oct 13, 2009

Exception: argument 2 to map() must support iteration

Code:
# Rebuild oauth handler
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_request_token(session.rtoken_key, session.rtoken_sec)

# Fetch access token
try:
    auth.get_access_token(request.vars.oauth_verifiler)
except tweepy.TweepError, e:
    return e # here
@7being
Copy link
Author

7being commented Oct 13, 2009

Python 2.5.1

@joshthecoder
Copy link
Member

Could you also paste a trace back for this exception. Thanks.

@7being
Copy link
Author

7being commented Oct 13, 2009

...I am new to python, and using web2py. I've tried, but don't known how to trace.
Sorry~
Is your gea example able to work?

@joshthecoder
Copy link
Member

Remove the try block and it should print out a traceback report on the console.

@7being
Copy link
Author

7being commented Oct 14, 2009

Ummm, it's my bad. I passed None request_key&secret to auth.set_request_token before get_access_token.
Thanks.
Keep up good works.

@joshthecoder
Copy link
Member

Glad you figured out the issue.

@pepijndevos
Copy link

I'm having the same problem. As long as I just use one auth object on the terminal everything goes fine, but as soon as I try to rebuild the object on another, it fails. I'm just doing auth.request_token.key and auth.request_token.secret in one terminal, and copying them to the other one to do auth.set_request_token("long value", "another logn value")

This issue was closed.
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

3 participants