title: HTTPerror in python urllib.request
body: <p>i was opening a url by using urllib.request.urlopen.</p>
  <p>The following exception was raised</p>
  <pre><code>    http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  
  HTTPError
  </code></pre>
  <p>I went through the documentation of the requests library</p>
  <p>*exception urllib.error.HTTPError</p>
  <p>Though being an exception (a subclass of URLError), an HTTPError can also function as a non-exceptional file-like return value (the same thing that urlopen() returns). This is useful when handling exotic HTTP errors, such as requests for authentication.</p>
  <p>code</p>
  <p>An HTTP status code as defined in RFC 2616. This numeric value corresponds to a value found in the dictionary of codes as found in http.server.BaseHTTPRequestHandler.responses.</p>
  <p>reason</p>
  <p>This is usually a string explaining the reason for this error.
  headers
  The HTTP response headers for the HTTP request that caused the HTTPError.*</p>
  <p>But in my case there was no error code or string which gave reason for the exception.
  <a href="https://i.stack.imgur.com/1VMLg.png" rel="nofollow noreferrer">enter image description here</a></p>