views:

81

answers:

1
Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
  92.                 response = callback(request, *callback_args, **callback_kwargs)
File "/home/ea/ea-repos/hell/life/views.py" in linkedin_auth
  137.     token = oauth_linkedin.get_unauthorised_request_token()
File "/home/ea/ea-repos/hell/life/oauth_linkedin.py" in get_unauthorised_request_token
  54.     resp = fetch_response(oauth_request, connection)
File "/home/ea/ea-repos/hell/life/oauth_linkedin.py" in fetch_response
  44.         connection.request(oauth_request.http_method,url)
File "/usr/lib/python2.6/httplib.py" in request
  874.             self._send_request(method, url, body, headers)
File "/usr/lib/python2.6/httplib.py" in _send_request
  891.         self.putrequest(method, url, **skips)
File "/usr/lib/python2.6/httplib.py" in putrequest
  778.             raise CannotSendRequest()

Exception Type: CannotSendRequest at /linkedin/auth
Exception Value: 

More specifically, it is occuring in this function:

def fetch_response(oauth_request, connection, linkedin_getinfo = False, other_url = ''):
    url = oauth_request.to_url()
    if linkedin_getinfo:
        headers = oauth_request.to_header()
        connection.request(oauth_request.http_method,other_url, headers = headers)
    else:
        connection.request(oauth_request.http_method,url)
    response = connection.getresponse()
    s = response.read()
    return s
+1  A: 

Look at this answer to see if it helps you: http://stackoverflow.com/questions/1925639/httplib-cannotsendrequest-error-in-wsgi

Paul Hildebrandt