get_request_token throws a TypeError

Bug #336039 reported by Rick Spencer on 2009-02-28
Affects Status Importance Assigned to Milestone
python-httplib2 (Ubuntu)

Bug Description

Using 0.2~bzr35-0ubuntu1

This code:
 token_url = EDGE_SERVICE_ROOT

  credentials = Credentials("rickspencer3-client")
  web_root_uri = URI(token_url)
  web_root_uri.path = "" ="api.", "", 1)
  token_url = str(web_root_uri.ensureSlash())
  print "Web root is " + web_root
  print "Getting token from " + token_url
  authorization_url = credentials.get_request_token(web_root=token_url)

Throws this error:
Traceback (most recent call last):
  File "", line 69, in <module>
    w = DashboardWindow()
  File "", line 26, in __init__
    lp = logon_task(None)
  File "", line 63, in logon_task
    return LaunchpadUtils.set_credentials()
  File "/media/disk/canonical/trunk/", line 51, in set_credentials
    authorization_url = credentials.get_request_token(web_root=token_url)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/", line 146, in get_request_token
    url, method='POST', body=urlencode(params))
  File "/var/lib/python-support/python2.6/httplib2/", line 1050, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/var/lib/python-support/python2.6/httplib2/", line 854, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/var/lib/python-support/python2.6/httplib2/", line 823, in _conn_request
    conn.request(method, request_uri, body, headers)
  File "/usr/lib/python2.6/", line 874, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.6/", line 911, in _send_request
  File "/usr/lib/python2.6/", line 868, in endheaders
  File "/usr/lib/python2.6/", line 740, in _send_output
  File "/usr/lib/python2.6/", line 699, in send
  File "/var/lib/python-support/python2.6/httplib2/", line 736, in connect
  File "<string>", line 1, in settimeout
TypeError: a float is required

should have included ...

This is running netbook remix alpha 5, fully updated.

Markus Korn (thekorn) wrote :

This looks like a bug in the python-httplib2 version in jaunty to me, and seems to be unrelated to launchpadlib.

Markus Korn (thekorn) wrote :

without knowing what bug 336067 is exactly about, python-httplib2 seems to be broken in python2.6
looking at the upstream patch shows changes in the set_timeout related code

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers