Closed redtoad closed 14 years ago
Originally reported by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)
Tried python2.4 setup.py test and gut:
python2.4 setup.py test
#!pytb Traceback (most recent call last): File "/tmp/python-amazon-product-api/tests/test-api-basics.py", line 47, in test_fails_for_too_many_requests ResponseGroup='???') File "/usr/lib/python2.4/unittest.py", line 320, in failUnlessRaises callableObj(*args, **kwargs) File "/tmp/python-amazon-product-api/amazonproduct.py", line 446, in item_lookup url = self._build_url(Operation='ItemLookup', ItemId=id, **params) File "/tmp/python-amazon-product-api/amazonproduct.py", line 347, in _build_url args = '&'.join('%s=%s' % (key, urllib2.quote(str(qargs[key]))) File "/tmp/python-amazon-product-api/amazonproduct.py", line 347, in <generator expression> args = '&'.join('%s=%s' % (key, urllib2.quote(str(qargs[key]))) AttributeError: 'module' object has no attribute 'quote'
Original comment by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)
Bugfix: API works under Python 2.4 again (fixes #13).
Original comment by Anonymous
I too found the same problem. You can work around it as follows:
import amazonproduct import urllib amazonproduct.urllib2.quote = urllib.quote
Originally reported by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)
Tried
python2.4 setup.py test
and gut: