Skip to content

exceptions

BodyNotHttplibCompatible

Bases: HTTPError

Body should be :class:http.client.HTTPResponse like (have an fp attribute which returns raw chunks) for read_chunked().

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
236
237
238
239
240
241
242
class BodyNotHttplibCompatible(HTTPError):
    """
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    """

    pass

ClosedPoolError

Bases: PoolError

Raised when a request enters a pool after the pool has been closed.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
146
147
148
149
class ClosedPoolError(PoolError):
    """Raised when a request enters a pool after the pool has been closed."""

    pass

ConnectTimeoutError

Bases: TimeoutError

Raised when a socket timeout occurs while connecting to a server

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
128
129
130
131
class ConnectTimeoutError(TimeoutError):
    """Raised when a socket timeout occurs while connecting to a server"""

    pass

DecodeError

Bases: HTTPError

Raised when automatic decoding based on Content-Type fails.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
58
59
60
61
class DecodeError(HTTPError):
    """Raised when automatic decoding based on Content-Type fails."""

    pass

DependencyWarning

Bases: HTTPWarning

Warned when an attempt is made to import a module with missing optional dependencies.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
221
222
223
224
225
226
227
class DependencyWarning(HTTPWarning):
    """
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    """

    pass

EmptyPoolError

Bases: PoolError

Raised when a pool runs out of connections and no more are allowed.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
140
141
142
143
class EmptyPoolError(PoolError):
    """Raised when a pool runs out of connections and no more are allowed."""

    pass

HTTPError

Bases: Exception

Base exception used by this module.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
 8
 9
10
11
class HTTPError(Exception):
    """Base exception used by this module."""

    pass

HTTPWarning

Bases: Warning

Base warning used by this module.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
14
15
16
17
class HTTPWarning(Warning):
    """Base warning used by this module."""

    pass

HeaderParsingError

Bases: HTTPError

Raised by assert_header_parsing, but we convert it to a log.warning statement.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
312
313
314
315
316
317
class HeaderParsingError(HTTPError):
    """Raised by assert_header_parsing, but we convert it to a log.warning statement."""

    def __init__(self, defects, unparsed_data):
        message = "%s, unparsed data: %r" % (defects or "Unknown", unparsed_data)
        super(HeaderParsingError, self).__init__(message)

HostChangedError

Bases: RequestError

Raised when an existing pool gets a request for a foreign host.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
 95
 96
 97
 98
 99
100
101
class HostChangedError(RequestError):
    """Raised when an existing pool gets a request for a foreign host."""

    def __init__(self, pool, url, retries=3):
        message = "Tried to open a foreign host with url: %s" % url
        RequestError.__init__(self, pool, url, message)
        self.retries = retries

IncompleteRead

Bases: HTTPError, IncompleteRead

Response length doesn't match expected Content-Length

Subclass of :class:http.client.IncompleteRead to allow int value for partial to avoid creating large objects on streamed reads.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
class IncompleteRead(HTTPError, httplib_IncompleteRead):
    """
    Response length doesn't match expected Content-Length

    Subclass of :class:`http.client.IncompleteRead` to allow int value
    for ``partial`` to avoid creating large objects on streamed reads.
    """

    def __init__(self, partial, expected):
        super(IncompleteRead, self).__init__(partial, expected)

    def __repr__(self):
        return "IncompleteRead(%i bytes read, %i more expected)" % (
            self.partial,
            self.expected,
        )

InsecurePlatformWarning

Bases: SecurityWarning

Warned when certain TLS/SSL configuration is not available on a platform.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
209
210
211
212
class InsecurePlatformWarning(SecurityWarning):
    """Warned when certain TLS/SSL configuration is not available on a platform."""

    pass

InsecureRequestWarning

Bases: SecurityWarning

Warned when making an unverified HTTPS request.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
197
198
199
200
class InsecureRequestWarning(SecurityWarning):
    """Warned when making an unverified HTTPS request."""

    pass

InvalidChunkLength

Bases: HTTPError, IncompleteRead

Invalid chunk length in a chunked response.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
class InvalidChunkLength(HTTPError, httplib_IncompleteRead):
    """Invalid chunk length in a chunked response."""

    def __init__(self, response, length):
        super(InvalidChunkLength, self).__init__(
            response.tell(), response.length_remaining
        )
        self.response = response
        self.length = length

    def __repr__(self):
        return "InvalidChunkLength(got length %r, %i bytes read)" % (
            self.length,
            self.partial,
        )

InvalidHeader

Bases: HTTPError

The header provided was somehow invalid.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
280
281
282
283
class InvalidHeader(HTTPError):
    """The header provided was somehow invalid."""

    pass

LocationParseError

Bases: LocationValueError

Raised when get_host or similar fails to parse the URL input.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
158
159
160
161
162
163
164
165
class LocationParseError(LocationValueError):
    """Raised when get_host or similar fails to parse the URL input."""

    def __init__(self, location):
        message = "Failed to parse: %s" % location
        HTTPError.__init__(self, message)

        self.location = location

LocationValueError

Bases: ValueError, HTTPError

Raised when there is something wrong with a given URL input.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
152
153
154
155
class LocationValueError(ValueError, HTTPError):
    """Raised when there is something wrong with a given URL input."""

    pass

MaxRetryError

Bases: RequestError

Raised when the maximum number of retries is exceeded.

:param pool: The connection pool :type pool: :class:~urllib3.connectionpool.HTTPConnectionPool :param string url: The requested Url :param exceptions.Exception reason: The underlying error

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class MaxRetryError(RequestError):
    """Raised when the maximum number of retries is exceeded.

    :param pool: The connection pool
    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
    :param string url: The requested Url
    :param exceptions.Exception reason: The underlying error

    """

    def __init__(self, pool, url, reason=None):
        self.reason = reason

        message = "Max retries exceeded with url: %s (Caused by %r)" % (url, reason)

        RequestError.__init__(self, pool, url, message)

NewConnectionError

Bases: ConnectTimeoutError, PoolError

Raised when we fail to establish a new connection. Usually ECONNREFUSED.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
134
135
136
137
class NewConnectionError(ConnectTimeoutError, PoolError):
    """Raised when we fail to establish a new connection. Usually ECONNREFUSED."""

    pass

PoolError

Bases: HTTPError

Base exception for errors caused within a pool.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
20
21
22
23
24
25
26
27
28
29
class PoolError(HTTPError):
    """Base exception for errors caused within a pool."""

    def __init__(self, pool, message):
        self.pool = pool
        HTTPError.__init__(self, "%s: %s" % (pool, message))

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, None)

ProtocolError

Bases: HTTPError

Raised when something unexpected happens mid-request/response.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
64
65
66
67
class ProtocolError(HTTPError):
    """Raised when something unexpected happens mid-request/response."""

    pass

ProxyError

Bases: HTTPError

Raised when the connection to a proxy fails.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
50
51
52
53
54
55
class ProxyError(HTTPError):
    """Raised when the connection to a proxy fails."""

    def __init__(self, message, error, *args):
        super(ProxyError, self).__init__(message, error, *args)
        self.original_error = error

ProxySchemeUnknown

Bases: AssertionError, URLSchemeUnknown

ProxyManager does not support the supplied scheme

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
class ProxySchemeUnknown(AssertionError, URLSchemeUnknown):
    """ProxyManager does not support the supplied scheme"""

    # TODO(t-8ch): Stop inheriting from AssertionError in v2.0.

    def __init__(self, scheme):
        # 'localhost' is here because our URL parser parses
        # localhost:8080 -> scheme=localhost, remove if we fix this.
        if scheme == "localhost":
            scheme = None
        if scheme is None:
            message = "Proxy URL had no scheme, should start with http:// or https://"
        else:
            message = (
                "Proxy URL had unsupported scheme %s, should use http:// or https://"
                % scheme
            )
        super(ProxySchemeUnknown, self).__init__(message)

ProxySchemeUnsupported

Bases: ValueError

Fetching HTTPS resources through HTTPS proxies is unsupported

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
306
307
308
309
class ProxySchemeUnsupported(ValueError):
    """Fetching HTTPS resources through HTTPS proxies is unsupported"""

    pass

ReadTimeoutError

Bases: TimeoutError, RequestError

Raised when a socket timeout occurs while receiving data from a server

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
120
121
122
123
class ReadTimeoutError(TimeoutError, RequestError):
    """Raised when a socket timeout occurs while receiving data from a server"""

    pass

RequestError

Bases: PoolError

Base exception for PoolErrors that have associated URLs.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
32
33
34
35
36
37
38
39
40
41
class RequestError(PoolError):
    """Base exception for PoolErrors that have associated URLs."""

    def __init__(self, pool, url, message):
        self.url = url
        PoolError.__init__(self, pool, message)

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, self.url, None)

ResponseError

Bases: HTTPError

Used as a container for an error reason supplied in a MaxRetryError.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
178
179
180
181
182
class ResponseError(HTTPError):
    """Used as a container for an error reason supplied in a MaxRetryError."""

    GENERIC_ERROR = "too many error responses"
    SPECIFIC_ERROR = "too many {status_code} error responses"

ResponseNotChunked

Bases: ProtocolError, ValueError

Response needs to be chunked in order to read it as chunks.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
230
231
232
233
class ResponseNotChunked(ProtocolError, ValueError):
    """Response needs to be chunked in order to read it as chunks."""

    pass

SNIMissingWarning

Bases: HTTPWarning

Warned when making a HTTPS request without SNI available.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
215
216
217
218
class SNIMissingWarning(HTTPWarning):
    """Warned when making a HTTPS request without SNI available."""

    pass

SSLError

Bases: HTTPError

Raised when SSL certificate fails in an HTTPS connection.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
44
45
46
47
class SSLError(HTTPError):
    """Raised when SSL certificate fails in an HTTPS connection."""

    pass

SecurityWarning

Bases: HTTPWarning

Warned when performing security reducing actions

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
185
186
187
188
class SecurityWarning(HTTPWarning):
    """Warned when performing security reducing actions"""

    pass

SubjectAltNameWarning

Bases: SecurityWarning

Warned when connecting to a host with a certificate missing a SAN.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
191
192
193
194
class SubjectAltNameWarning(SecurityWarning):
    """Warned when connecting to a host with a certificate missing a SAN."""

    pass

SystemTimeWarning

Bases: SecurityWarning

Warned when system time is suspected to be wrong

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
203
204
205
206
class SystemTimeWarning(SecurityWarning):
    """Warned when system time is suspected to be wrong"""

    pass

TimeoutError

Bases: HTTPError

Raised when a socket timeout error occurs.

Catching this error will catch both :exc:ReadTimeoutErrors <ReadTimeoutError> and :exc:ConnectTimeoutErrors <ConnectTimeoutError>.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
110
111
112
113
114
115
116
117
class TimeoutError(HTTPError):
    """Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    """

    pass

TimeoutStateError

Bases: HTTPError

Raised when passing an invalid state to a timeout

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
104
105
106
107
class TimeoutStateError(HTTPError):
    """Raised when passing an invalid state to a timeout"""

    pass

URLSchemeUnknown

Bases: LocationValueError

Raised when a URL input has an unsupported scheme.

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
168
169
170
171
172
173
174
175
class URLSchemeUnknown(LocationValueError):
    """Raised when a URL input has an unsupported scheme."""

    def __init__(self, scheme):
        message = "Not supported URL scheme %s" % scheme
        super(URLSchemeUnknown, self).__init__(message)

        self.scheme = scheme

UnrewindableBodyError

Bases: HTTPError

urllib3 encountered an error when trying to rewind a body

Source code in client/ayon_fusion/vendor/urllib3/exceptions.py
320
321
322
323
class UnrewindableBodyError(HTTPError):
    """urllib3 encountered an error when trying to rewind a body"""

    pass