We found that when trying to access, view, download files using urllib2 we occasionally came across the following error (<class ‘urllib2.HTTPError’>: HTTP Error 400: Bad Request)
In most cases when this happened we were able to access the files using httplib instead.
for example
instead of using urllib2.urlopen(geturl).read()
We would use
>>>conn = httplib.HTTPConnection(“serverAnd:portToAccess”)
>>> this = conn.putrequest(“GET”, “fileUrlGoesHere”)
>>> conn.endheaders()
>>> r = conn.getresponse()
Did you investigate why this happened?
Hi
It was a while ago and I am unable to remember exactly why this was the case. Sorry I could not be of more help.