python script failing

I am trying to develop a tool which calculates review metricsBut its showing error.Any one familiar with this.


/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/ DeprecationWarning: the md5 module is deprecated; use hashlib instead

import md5

/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/ DeprecationWarning: the sha module is deprecated; use the hashlib module instead

import sha

Traceback (most recent call last):

File "", line 37, in <module>

resp = conn.request_get("/filter/allOpenReviews", args={}, headers={'content-type':'application/json', 'accept':'application/json'})

File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/", line 62, in request_get

return self.request(resource, "get", args, headers=headers)

File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/", line 140, in request

resp, content = self.h.request(u"%s://%s%s" % (self.scheme,, u'/'.join(request_path)), method.upper(), body=body, headers=headers )

File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/", line 1050, in request

(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)

File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/", line 854, in _request

(response, content) = self._conn_request(conn, request_uri, method, body, headers)

File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/", line 823, in _conn_request

conn.request(method, request_uri, body, headers)

File "/usr/lib64/python2.6/", line 914, in request

self._send_request(method, url, body, headers)

File "/usr/lib64/python2.6/", line 951, in _send_request


File "/usr/lib64/python2.6/", line 908, in endheaders


File "/usr/lib64/python2.6/", line 780, in _send_output


File "/usr/lib64/python2.6/", line 739, in send


File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/", line 736, in connect


File "<string>", line 1, in settimeout

TypeError: a float is required

2 answers

0 vote

Hi Lynn,

I would kindly ask you to go to your terminal and type in

python -V

md5 has been depricated since Python 2.5 and it is recommended to use hashlib instead.

Please, open up a Terminal and execute the following command:

$ python
&gt;&gt;&gt; import hashlib
&gt;&gt;&gt; m = hashlib.md5()
&gt;&gt;&gt; m.update("Nobody inspects")
&gt;&gt;&gt; m.update(" the spammish repetition")
&gt;&gt;&gt; m.digest()
&gt;&gt;&gt; m.digest_size
&gt;&gt;&gt; m.block_size

Kind regards,

0 vote
Lukasz Pater Atlassian Team May 07, 2014

Hi Lynn,

According to seems to be a bug in httplib2. Either patching or upgrading your python version should help/

Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

565 views 6 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot