<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](urllib.robotparser.xhtml "urllib.robotparser --- Parser for robots.txt") | - [上一頁](urllib.parse.xhtml "urllib.parse --- Parse URLs into components") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [互聯網協議和支持](internet.xhtml) ? - $('.inline-search').show(0); | # [`urllib.error`](#module-urllib.error "urllib.error: Exception classes raised by urllib.request.") --- Exception classes raised by urllib.request **Source code:** [Lib/urllib/error.py](https://github.com/python/cpython/tree/3.7/Lib/urllib/error.py) \[https://github.com/python/cpython/tree/3.7/Lib/urllib/error.py\] - - - - - - The [`urllib.error`](#module-urllib.error "urllib.error: Exception classes raised by urllib.request.") module defines the exception classes for exceptions raised by [`urllib.request`](urllib.request.xhtml#module-urllib.request "urllib.request: Extensible library for opening URLs."). The base exception class is [`URLError`](#urllib.error.URLError "urllib.error.URLError"). The following exceptions are raised by [`urllib.error`](#module-urllib.error "urllib.error: Exception classes raised by urllib.request.") as appropriate: *exception* `urllib.error.``URLError`The handlers raise this exception (or derived exceptions) when they run into a problem. It is a subclass of [`OSError`](exceptions.xhtml#OSError "OSError"). `reason`The reason for this error. It can be a message string or another exception instance. 在 3.3 版更改: [`URLError`](#urllib.error.URLError "urllib.error.URLError") has been made a subclass of [`OSError`](exceptions.xhtml#OSError "OSError") instead of [`IOError`](exceptions.xhtml#IOError "IOError"). *exception* `urllib.error.``HTTPError`Though being an exception (a subclass of [`URLError`](#urllib.error.URLError "urllib.error.URLError")), an [`HTTPError`](#urllib.error.HTTPError "urllib.error.HTTPError") can also function as a non-exceptional file-like return value (the same thing that [`urlopen()`](urllib.request.xhtml#urllib.request.urlopen "urllib.request.urlopen") returns). This is useful when handling exotic HTTP errors, such as requests for authentication. `code`An HTTP status code as defined in [**RFC 2616**](https://tools.ietf.org/html/rfc2616.html) \[https://tools.ietf.org/html/rfc2616.html\]. This numeric value corresponds to a value found in the dictionary of codes as found in [`http.server.BaseHTTPRequestHandler.responses`](http.server.xhtml#http.server.BaseHTTPRequestHandler.responses "http.server.BaseHTTPRequestHandler.responses"). `reason`This is usually a string explaining the reason for this error. `headers`The HTTP response headers for the HTTP request that caused the [`HTTPError`](#urllib.error.HTTPError "urllib.error.HTTPError"). 3\.4 新版功能. *exception* `urllib.error.``ContentTooShortError`(*msg*, *content*)This exception is raised when the [`urlretrieve()`](urllib.request.xhtml#urllib.request.urlretrieve "urllib.request.urlretrieve")function detects that the amount of the downloaded data is less than the expected amount (given by the *Content-Length* header). The `content` attribute stores the downloaded (and supposedly truncated) data. ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](urllib.robotparser.xhtml "urllib.robotparser --- Parser for robots.txt") | - [上一頁](urllib.parse.xhtml "urllib.parse --- Parse URLs into components") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [互聯網協議和支持](internet.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看