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

TypeError at /oauth/request_token/ #1

Open
igomrod opened this issue Mar 9, 2012 · 1 comment
Open

TypeError at /oauth/request_token/ #1

igomrod opened this issue Mar 9, 2012 · 1 comment

Comments

@igomrod
Copy link

igomrod commented Mar 9, 2012

Hi,

In first place thanks for this example.

I'm playing with it an i got an error 500 when the script tries to request the token

localhost 8000
Traceback (most recent call last):
File "oauth_client.py", line 29, in
raise Exception("Invalid response %s." % resp['status'])
Exception: Invalid response 500.

Server logs looks like

09/Mar/2012 03:43:41] "GET /oauth/request_token/?oauth_body_hash=2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D&oauth_nonce=45316354&oauth_timestamp=1331286221&oauth_consumer_key=testkey&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_signature=1qSb7WAJqLDPNvYK8Ql%2BZJKyrKM%3D HTTP/1.1" 500 90921

and opening that url in the browser I got

TypeError at /oauth/request_token/
character mapping must return integer, None or unicode
Request Method: GET
Request URL: http://127.0.0.1:8000/oauth/request_token/?oauth_body_hash=2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D&oauth_nonce=70655149&oauth_timestamp=1331285442&oauth_consumer_key=testkey&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_signature=TNxewGWYY1lGVHgs5wycGyPBFEQ%3D
Django Version: 1.3.1
Exception Type: TypeError
Exception Value:
character mapping must return integer, None or unicode
Exception Location: /usr/lib/python2.7/hmac.py in init, line 72
Python Executable: /home/ctag/workspace_globalsense/django-piston-oauth-example/env/bin/python
Python Version: 2.7.1

Any idea ?

Thanks in advance!

@igomrod
Copy link
Author

igomrod commented Mar 9, 2012

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

1 participant