Skip to content

Tag: urlopen

How to print fp in HTTPError?

After seeing this error with my urlopen() function: I wrote a catch exception, but fp is empty when I printed it out. Any ideas? Output: fp isn’t empty in the HTTPError class Output: Thanks. Answer Perhaps I’m dense; but a few items that might help you. You have an errant ” in your print(&#8…