glogiotatidis/django-piston-oauth-example — Issue #1: TypeError at /oauth/request_token/
Author: kguento
Created: 2012-03-09 09:45:55+00:00
State: open

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!