Files
aitsc/.venv/Lib/site-packages/httpx/__pycache__/_exceptions.cpython-312.pyc

154 lines
12 KiB
Plaintext
Raw Normal View History

2025-02-23 09:07:52 +08:00
<EFBFBD>
2025-08-16 19:28:45 +08:00
<00><18>h<EFBFBD>"<00><01><><00>dZddlmZddlZddlZej
2025-02-23 09:07:52 +08:00
rddlmZmZgd<06>Z Gd<07>de
<EFBFBD>Z Gd <09>d
e <0B>Z Gd <0B>d e <0C>Z Gd <0A>de <0A>ZGd<0F>de<0E>ZGd<11>de<0E>ZGd<13>de<0E>ZGd<15>de<0E>ZGd<17>de <0A>ZGd<19>de<13>ZGd<1B>de<13>ZGd<1D>de<13>ZGd<1F>d e<13>ZGd!<21>d"e <0A>ZGd#<23>d$e <0A>ZGd%<25>d&e <0A>ZGd'<27>d(e<1A>ZGd)<29>d*e<1A>ZGd+<2B>d,e <0C>ZGd-<2D>d.e <0C>ZGd/<2F>d0e <0B>ZGd1<64>d2e
<EFBFBD>Z Gd3<64>d4e
<EFBFBD>Z!Gd5<64>d6e"<22>Z#Gd7<64>d8e#<23>Z$Gd9<64>d:e#<23>Z%Gd;<3B>d<e#<23>Z&Gd=<3D>d>e#<23>Z'ejP d@ dAd?<3F><05>Z)y)Bul
Our exception hierarchy:
* HTTPError
x RequestError
+ TransportError
- TimeoutException
· ConnectTimeout
· ReadTimeout
· WriteTimeout
· PoolTimeout
- NetworkError
· ConnectError
· ReadError
· WriteError
· CloseError
- ProtocolError
· LocalProtocolError
· RemoteProtocolError
- ProxyError
- UnsupportedProtocol
+ DecodingError
+ TooManyRedirects
x HTTPStatusError
* InvalidURL
* CookieConflict
* StreamError
x StreamConsumed
x StreamClosed
x ResponseNotRead
x RequestNotRead
<EFBFBD>)<01> annotationsN<73>)<02>Request<73>Response)<1C>
CloseError<EFBFBD> ConnectError<6F>ConnectTimeout<75>CookieConflict<63> DecodingError<6F> HTTPError<6F>HTTPStatusError<6F>
InvalidURL<EFBFBD>LocalProtocolError<6F> NetworkError<6F> PoolTimeout<75> ProtocolError<6F>
ProxyError<EFBFBD> ReadError<6F> ReadTimeout<75>RemoteProtocolError<6F> RequestError<6F>RequestNotRead<61>ResponseNotRead<61> StreamClosed<65>StreamConsumed<65> StreamError<6F>TimeoutException<6F>TooManyRedirects<74>TransportError<6F>UnsupportedProtocol<6F>
WriteError<EFBFBD> WriteTimeoutc<01>\<00><00>eZdZdZd<05>fd<02> Zedd<03><04>Zejdd<04><04>Z<06>xZS)r a<>
Base class for `RequestError` and `HTTPStatusError`.
Useful for `try...except` blocks when issuing a request,
and then calling `.raise_for_status()`.
For example:
```
try:
response = httpx.get("https://www.example.com")
response.raise_for_status()
except httpx.HTTPError as exc:
print(f"HTTP Exception for {exc.request.url} - {exc}")
```
2025-08-16 19:28:45 +08:00
c<01>2<00><01>t<00>|<00>|<01>d|_y<00>N<><03>super<65>__init__<5F>_request<73><03>self<6C>message<67> __class__s <20><>5D:\aitsc\.venv\Lib\site-packages\httpx\_exceptions.pyr(zHTTPError.__init__\s<00><><00> <0A><07><18><17>!<21>(,<2C><04> <0A>c<01>H<00>|j<00> td<01><00>|jS)Nz'The .request property has not been set.)r)<00> RuntimeError)r+s r.<00>requestzHTTPError.request`s"<00><00> <0F>=<3D>=<3D> <20><1E>H<>I<> I<><13>}<7D>}<7D>r/c<01><00>||_yr%)r))r+r2s r.r2zHTTPError.requestfs <00><00><1F><04> r/<00>r,<00>str<74>return<72>None)r6r)r2rr6r7) <09>__name__<5F>
2025-02-23 09:07:52 +08:00
__module__<EFBFBD> __qualname__<5F>__doc__r(<00>propertyr2<00>setter<65> __classcell__<5F>r-s@r.r r Js9<00><><00><08>"-<2D><0E><1D><0E><1D>
 <0A>^<5E>^<5E> <20><14> r/r c<01>*<00><00>eZdZdZdd<03>d<05>fd<04>Z<04>xZS)rzS
Base class for all exceptions that may occur when issuing a `.request()`.
N)r2c<01>2<00><01>t<00>|<00>|<01>||_yr%r&)r+r,r2r-s <20>r.r(zRequestError.__init__ps<00><><00> <0A><07><18><17>!<21> <20><04> r/)r,r5r2<00>Request | Noner6r7<00>r8r9r:r;r(r>r?s@r.rrks<00><><00><08>CG<01> <20> r/rc<01><00>eZdZdZy)rzU
Base class for all exceptions that occur at the level of the Transport API.
N<>r8r9r:r;<00>r/r.rr{<00><00><00>r/rc<01><00>eZdZdZy)rzM
The base class for timeout errors.
An operation has timed out.
NrErFr/r.rr<00><00><00><00>r/rc<01><00>eZdZdZy)r z1
Timed out while connecting to the host.
NrErFr/r.r r <00>rGr/r c<01><00>eZdZdZy)rz7
Timed out while receiving data from the host.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)r"z3
Timed out while sending data to the host.
NrErFr/r.r"r"<00>rGr/r"c<01><00>eZdZdZy)rzB
Timed out waiting to acquire a connection from the pool.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)rzo
The base class for network-related errors.
An error occurred while interacting with the network.
NrErFr/r.rr<00>rIr/rc<01><00>eZdZdZy)rz2
Failed to receive data from the network.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)r!z2
Failed to send data through the network.
NrErFr/r.r!r!<00>rGr/r!c<01><00>eZdZdZy)rz+
Failed to establish a connection.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)rz'
Failed to close a connection.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)rzB
An error occurred while establishing a proxy connection.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)r z<>
Attempted to make a request to an unsupported protocol.
For example issuing a request to `ftp://www.example.com`.
NrErFr/r.r r <00>rIr/r c<01><00>eZdZdZy)rz$
The protocol was violated.
NrErFr/r.rr<00>rGr/rc<01><00>eZdZdZy)rz<>
A protocol was violated by the client.
For example if the user instantiated a `Request` instance explicitly,
failed to include the mandatory `Host:` header, and then issued it directly
using `client.send()`.
NrErFr/r.rr<00>s<00><00>r/rc<01><00>eZdZdZy)rz^
The protocol was violated by the server.
For example, returning malformed HTTP.
NrErFr/r.rr<00>rIr/rc<01><00>eZdZdZy)r zG
Decoding of the response failed, due to a malformed encoding.
NrErFr/r.r r <00>rGr/r c<01><00>eZdZdZy)rz
Too many redirects.
NrErFr/r.rr<00>rGr/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)r z|
The response had an error HTTP status of 4xx or 5xx.
May be raised when calling `response.raise_for_status()`
c<01>@<00><01>t<00>|<00>|<01>||_||_yr%)r'r(r2<00>response)r+r,r2r\r-s <20>r.r(zHTTPStatusError.__init__ s<00><><00> <0A><07><18><17>!<21><1E><04> <0C> <20><04> r/)r,r5r2rr\rr6r7rCr?s@r.r r s<00><><00><08> !<21>!r/r c<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rz7
URL is improperly formed or cannot be parsed.
c<01>$<00><01>t<00>|<00>|<01>yr%<00>r'r(r*s <20>r.r(zInvalidURL.__init__<00><00><><00> <0A><07><18><17>!r/r4rCr?s@r.rrs<00><><00><08>"<22>"r/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)r
z<>
Attempted to lookup a cookie by name, but multiple cookies existed.
Can occur when calling `response.cookies.get(...)`.
c<01>$<00><01>t<00>|<00>|<01>yr%r_r*s <20>r.r(zCookieConflict.__init__r`r/r4rCr?s@r.r
r
s<00><><00><08> "<22>"r/r
c<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rz<>
The base class for stream exceptions.
The developer made an error in accessing the request stream in
an invalid way.
c<01>$<00><01>t<00>|<00>|<01>yr%r_r*s <20>r.r(zStreamError.__init__1r`r/r4rCr?s@r.rr)s<00><><00><08>"<22>"r/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rz]
Attempted to read or stream content, but the content has already
been streamed.
c<01>(<00><01>d}t<00>|<00>|<01>y)Na]Attempted to read or stream some content, but the content has already been streamed. For requests, this could be due to passing a generator as request content, and then receiving a redirect response or a secondary request as part of an authentication flow.For responses, this could be due to attempting to stream the response content more than once.r_r*s <20>r.r(zStreamConsumed.__init__;s<00><><00> &<26> <10> <0E><07><18><17>!r/<00>r6r7rCr?s@r.rr5s<00><><00><08>
"<22> "r/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rz\
Attempted to read or stream response content, but the request has been
closed.
c<01>(<00><01>d}t<00>|<00>|<01>y)NzDAttempted to read or stream content, but the stream has been closed.r_r*s <20>r.r(zStreamClosed.__init__Ms<00><><00> U<> <10> <0E><07><18><17>!r/rgrCr?s@r.rrGs<00><><00><08>
"<22>"r/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rzY
Attempted to access streaming response content, without having called `read()`.
c<01>(<00><01>d}t<00>|<00>|<01>y)NzOAttempted to access streaming response content, without having called `read()`.r_r*s <20>r.r(zResponseNotRead.__init__Y<00><00><><00> /<2F> <10> <0E><07><18><17>!r/rgrCr?s@r.rrT<00><00><><00><08>"<22>"r/rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rzX
Attempted to access streaming request content, without having called `read()`.
c<01>(<00><01>d}t<00>|<00>|<01>y)NzNAttempted to access streaming request content, without having called `read()`.r_r*s <20>r.r(zRequestNotRead.__init__frlr/rgrCr?s@r.rrarmr/rc#<01>NK<00> d<01><02>y#t$r}|<00>||_|<01>d}~wwxYw<01>w)z<>
A context manager that can be used to attach the given request context
to any `RequestError` exceptions that are raised within the block.
N)rr2)r2<00>excs r.<00>request_contextrrns/<00><00><><00><12> <0A><> <17><12> <12> <1E>!<21>C<EFBFBD>K<EFBFBD><11> <09><><12>s<00>%<01> <00>%<01> "<03> <03>"<03>%r%)r2rBr6ztyping.Iterator[None])*r;<00>
__future__r<00>
contextlib<EFBFBD>typing<6E> TYPE_CHECKING<4E>_modelsrr<00>__all__<5F> Exceptionr rrrr rr"rrrr!rrrr rrrr rr rr
r1rrrrr<00>contextmanagerrrrFr/r.<00><module>r{s<><00><01><04>B#<23><11> <0A> <09><17><17>*<2A> <02><07>@ <20> <09> <20>B  <20>9<EFBFBD>  <20> <08>\<5C><08><08>~<7E><08><08>%<25><08> <08>"<22><08> <08>#<23><08> <08>"<22><08><08>><3E><08><08> <0C><08> <08><1C><08> <08><<3C><08> <08><1C><08><08><1E><08> <08>.<2E><08><08>N<EFBFBD><08> <08><1D><08><08>-<2D><08><08>L<EFBFBD><08> <08>|<7C><08>
!<21>i<EFBFBD>
!<21>"<22><19>"<22>"<22>Y<EFBFBD>"<22>" "<22>,<2C> "<22>"<22>[<5B>"<22>$
"<22>;<3B>
"<22>
"<22>k<EFBFBD>
"<22>
"<22>[<5B>
"<22> <0C><1A><1A>"<22> <12> <1B> <12><1A> <12><1B> r/