I am trying to develop a tool which calculates review metricsBut its showing error.Any one familiar with this.
python crucible_data.py
/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
Traceback (most recent call last):
File "crucible_data.py", 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/restful_lib.py", 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/restful_lib.py", line 140, in request
resp, content = self.h.request(u"%s://%s%s" % (self.scheme, self.host, u'/'.join(request_path)), method.upper(), body=body, headers=headers )
File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/__init__.py", 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/__init__.py", 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/__init__.py", line 823, in _conn_request
conn.request(method, request_uri, body, headers)
File "/usr/lib64/python2.6/httplib.py", line 914, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
self.endheaders()
File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
self._send_output()
File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
self.send(msg)
File "/usr/lib64/python2.6/httplib.py", line 739, in send
self.connect()
File "/home/vishwana/fpciman/review_metrics/trunk/virtualenv/lib/python2.6/site-packages/httplib2/__init__.py", line 736, in connect
sock.settimeout(self.timeout)
File "<string>", line 1, in settimeout
TypeError: a float is required
Hi Lynn,
According to https://code.google.com/p/python-rest-client/issues/detail?id=1and https://code.google.com/p/httplib2/issues/detail?id=39it seems to be a bug in httplib2. Either patching or upgrading your python version should help/
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 >>> import hashlib >>> m = hashlib.md5() >>> m.update("Nobody inspects") >>> m.update(" the spammish repetition") >>> m.digest() '\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9' >>> m.digest_size 16 >>> m.block_size 64
Kind regards,
Rafael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.