I used Python's urllib2.urlopen
and got a 500 error from the server. How do I find the text of the error? I'm hoping that it has useful information.
Asked
Active
Viewed 569 times
3

Ram Rachum
- 84,019
- 84
- 236
- 374
1 Answers
3
from urllib2 import urlopen, HTTPError
try:
f = urlopen(url)
except HTTPError, e:
print(e.read())

Fred Foo
- 355,277
- 75
- 744
- 836