+
    Q\i,                     n   R t ^ RIHt ^ RIHtHt ^ RIHtHt  ! R R]	4      t
 ! R R]	4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t ! R R]]4      t ! R R]	4      t ! R R]]4      t ! R R]	4      t ! R R]	4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R  R!]4      t ! R" R#]4      t ! R$ R%]4      t ! R& R']4      t  ! R( R)]4      t! ! R* R+]!4      t" ! R, R-]4      t# ! R. R/]4      t$ ! R0 R1]4      t% ! R2 R3]%]&]4      t' ! R4 R5]]4      t( ! R6 R7]	4      t) ! R8 R9])4      t* ! R: R;])4      t+ ! R< R=]+4      t, ! R> R?]	4      t- ! R@ RA]-4      t. ! RB RC]-4      t/ ! RD RE]-4      t0 ! RF RG]	4      t1 ! RH RI]14      t2 ! RJ RK]14      t3 ! RL RM]	4      t4RN# )OzContains all custom errors.)Path)OptionalUnion)	HTTPErrorResponsec                   N   a a ] tR t^t oRtV3R lV 3R lltV3R ltRtVtV ;t	# )CacheNotFoundz9Exception thrown when the Huggingface cache is not found.c                <   < V ^8  d   QhRS[ RS[S[ S[3,          /# )   msg	cache_dir)strr   r   )format__classdict__s   "n/Users/agent/.cache/uv/archive-v0/6ZL4-8mCcRNgGE9wi6M6J/lib/python3.14/site-packages/huggingface_hub/errors.py__annotate__CacheNotFound.__annotate__   s$     # #C #E#t),< #    c                <   < \         SV `  ! V.VO5/ VB  W n        R # N)super__init__r   )selfr   r   argskwargs	__class__s   &&&*,r   r   CacheNotFound.__init__   s    .t.v."r   c                <   < V ^8  d   Qh/ S[ S[S[3,          ;R&   # )r
   r   )r   r   r   )r   r   s   "r   r   r      s      S$Y r   )r   )
__name__
__module____qualname____firstlineno____doc__r   __annotate_func____static_attributes____classdictcell____classcell__r   r   s   @@r   r   r      s     C# #  r   r   c                       ] tR t^tRtRtR# )CorruptedCacheExceptionzGException for any unexpected structure in the Huggingface cache-system. Nr   r   r    r!   r"   r$   r*   r   r   r)   r)      s    Qr   r)   c                       ] tR t^tRtRtR# )LocalTokenNotFoundErrorz0Raised if local token is required but not found.r*   Nr+   r*   r   r   r-   r-          :r   r-   c                       ] tR t^$tRtRtR# )OfflineModeIsEnabledzTRaised when a request is made but `HF_HUB_OFFLINE=1` is set as environment variable.r*   Nr+   r*   r   r   r0   r0   $   s    ^r   r0   c                   `   a a ] tR t^(t oRtR	RR/V3R lV 3R lllltV3R lR ltRtVtV ;t	# )
HfHubHTTPErroraA  
    HTTPError to inherit from for any custom HTTP Error raised in HF Hub.

    Any HTTPError is converted at least into a `HfHubHTTPError`. If some information is
    sent back by the server, it will be added to the error message.

    Added details:
    - Request ID sourced from headers in order of precedence: "X-Request-Id", "X-Amzn-Trace-Id", "X-Amz-Cf-Id".
    - Server error message from the header "X-Error-Message".
    - Server error message if we can found one in the response body.

    Example:
    ```py
        import requests
        from huggingface_hub.utils import get_session, hf_raise_for_status, HfHubHTTPError

        response = get_session().post(...)
        try:
            hf_raise_for_status(response)
        except HfHubHTTPError as e:
            print(str(e)) # formatted message
            e.request_id, e.server_message # details returned by server

            # Complete the error message with additional information once it's raised
            e.append_to_message("
`create_commit` expects the repository to exist.")
            raise
    ```
    Nserver_messagec                L   < V ^8  d   QhRS[ RS[S[,          RS[S[ ,          /# )r
   messageresponser3   )r   r   r   )r   r   s   "r   r   HfHubHTTPError.__annotate__F   s.     
 
 
x/A 
]efi]j 
r   c               0  < Veb   VP                   P                  R4      ;'       g?    VP                   P                  R4      ;'       g    VP                   P                  R4      MR V n        W0n        \        ST `  TTVe   VP                  MR R7       R # )Nzx-request-idzX-Amzn-Trace-Idzx-amz-cf-id)r6   request)headersget
request_idr3   r   r   r9   )r   r5   r6   r3   r   s   &&&$r   r   HfHubHTTPError.__init__F   s    
 #   0 3 3##$563 3##M2 	 -(0(<H$$$ 	 	
r   c                $   < V ^8  d   QhRS[ RR/# )r
   additional_messagereturnNr   )r   r   s   "r   r   r7   V   s     I IC ID Ir   c                v    V P                   ^ ,          V,           3V P                   R,          ,           V n         R# )zFAppend additional information to the `HfHubHTTPError` initial message.:   NNN)r   )r   r?   s   &&r   append_to_message HfHubHTTPError.append_to_messageV   s'    YYq\$668499R=H	r   )r   r<   r3   r   )
r   r   r    r!   r"   r   rD   r$   r%   r&   r'   s   @@r   r2   r2   (   s.     :
mq 
 
 I I Ir   r2   c                       ] tR t^^tRtRtR# )InferenceTimeoutErrorzBError raised when a model is unavailable or the request times out.r*   Nr+   r*   r   r   rG   rG   ^   s    Lr   rG   c                       ] tR t^etRtRtR# )InferenceEndpointErrorz8Generic exception when dealing with Inference Endpoints.r*   Nr+   r*   r   r   rI   rI   e   s    Br   rI   c                       ] tR t^itRtRtR# )InferenceEndpointTimeoutErrorz<Exception for timeouts while waiting for Inference Endpoint.r*   Nr+   r*   r   r   rK   rK   i   s    Fr   rK   c                       ] tR t^ptRtRtR# )SafetensorsParsingErrorzRaised when failing to parse a safetensors file metadata.

This can be the case if the file is not a safetensors file or does not respect the specification.
r*   Nr+   r*   r   r   rM   rM   p       r   rM   c                       ] tR t^wtRtRtR# )NotASafetensorsRepoErrorzRaised when a repo is not a Safetensors repo i.e. doesn't have either a `model.safetensors` or a
`model.safetensors.index.json` file.
r*   Nr+   r*   r   r   rP   rP   w   s    r   rP   c                       ] tR t^tRtRtR# )TextGenerationErrorz3Generic error raised if text-generation went wrong.r*   Nr+   r*   r   r   rR   rR          =r   rR   c                       ] tR t^tRtRtR# )ValidationErrorzServer-side validation error.r*   Nr+   r*   r   r   rU   rU      s    'r   rU   c                       ] tR t^tRtR# )GenerationErrorr*   Nr   r   r    r!   r$   r*   r   r   rW   rW          r   rW   c                       ] tR t^tRtR# )OverloadedErrorr*   NrX   r*   r   r   r[   r[      rY   r   r[   c                       ] tR t^tRtR# )IncompleteGenerationErrorr*   NrX   r*   r   r   r]   r]      rY   r   r]   c                       ] tR t^tRtR# )UnknownErrorr*   NrX   r*   r   r   r_   r_      rY   r   r_   c                       ] tR t^tRtRtR# )HFValidationErrorzGeneric exception thrown by `huggingface_hub` validators.

Inherits from [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError).
r*   Nr+   r*   r   r   ra   ra      rN   r   ra   c                       ] tR t^tRtRtR# )FileMetadataErrorzError triggered when the metadata of a file on the Hub cannot be retrieved (missing ETag or commit_hash).

Inherits from `OSError` for backward compatibility.
r*   Nr+   r*   r   r   rc   rc      rN   r   rc   c                       ] tR t^tRtRtR# )RepositoryNotFoundErrorae  
Raised when trying to access a hf.co URL with an invalid repository name, or
with a private repo name the user does not have access to.

Example:

```py
>>> from huggingface_hub import model_info
>>> model_info("<non_existent_repository>")
(...)
huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: PvMw_VjBMjVdMz53WKIzP)

Repository Not Found for url: https://huggingface.co/api/models/%3Cnon_existent_repository%3E.
Please make sure you specified the correct `repo_id` and `repo_type`.
If the repo is private, make sure you are authenticated.
Invalid username or password.
```
r*   Nr+   r*   r   r   re   re      s    r   re   c                       ] tR t^tRtRtR# )GatedRepoErrora  
Raised when trying to access a gated repository for which the user is not on the
authorized list.

Note: derives from `RepositoryNotFoundError` to ensure backward compatibility.

Example:

```py
>>> from huggingface_hub import model_info
>>> model_info("<gated_repository>")
(...)
huggingface_hub.utils._errors.GatedRepoError: 403 Client Error. (Request ID: ViT1Bf7O_026LGSQuVqfa)

Cannot access gated repo for url https://huggingface.co/api/models/ardent-figment/gated-model.
Access to model ardent-figment/gated-model is restricted and you are not in the authorized list.
Visit https://huggingface.co/ardent-figment/gated-model to ask for access.
```
r*   Nr+   r*   r   r   rg   rg      s    r   rg   c                       ] tR t^tRtRtR# )DisabledRepoErrora  
Raised when trying to access a repository that has been disabled by its author.

Example:

```py
>>> from huggingface_hub import dataset_info
>>> dataset_info("laion/laion-art")
(...)
huggingface_hub.utils._errors.DisabledRepoError: 403 Client Error. (Request ID: Root=1-659fc3fa-3031673e0f92c71a2260dbe2;bc6f4dfb-b30a-4862-af0a-5cfe827610d8)

Cannot access repository for url https://huggingface.co/api/datasets/laion/laion-art.
Access to this resource is disabled.
```
r*   Nr+   r*   r   r   ri   ri          r   ri   c                       ] tR t^tRtRtR# )RevisionNotFoundErrora  
Raised when trying to access a hf.co URL with a valid repository but an invalid
revision.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', 'config.json', revision='<non-existent-revision>')
(...)
huggingface_hub.utils._errors.RevisionNotFoundError: 404 Client Error. (Request ID: Mwhe_c3Kt650GcdKEFomX)

Revision Not Found for url: https://huggingface.co/bert-base-cased/resolve/%3Cnon-existent-revision%3E/config.json.
```
r*   Nr+   r*   r   r   rl   rl      rj   r   rl   c                       ] tR tRtRtRtR# )EntryNotFoundErrori  a  
Raised when trying to access a hf.co URL with a valid repository and revision
but an invalid filename.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', '<non-existent-file>')
(...)
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: 53pNl6M0MxsnG5Sw8JA6x)

Entry Not Found for url: https://huggingface.co/bert-base-cased/resolve/main/%3Cnon-existent-file%3E.
```
r*   Nr+   r*   r   r   rn   rn     rj   r   rn   c                   B   a a ] tR tRt oRtV3R lV 3R lltRtVtV ;t# )LocalEntryNotFoundErrori  a  
Raised when trying to access a file or snapshot that is not on the disk when network is
disabled or unavailable (connection issue). The entry may exist on the Hub.

Note: `ValueError` type is to ensure backward compatibility.
Note: `LocalEntryNotFoundError` derives from `HTTPError` because of `EntryNotFoundError`
      even when it is not a network issue.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', '<non-cached-file>',  local_files_only=True)
(...)
huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False.
```
c                    < V ^8  d   QhRS[ /# )r
   r5   rA   )r   r   s   "r   r   $LocalEntryNotFoundError.__annotate__(  s     1 1 1r   c                *   < \         SV `  VR R7       R # )N)r6   )r   r   )r   r5   r   s   &&r   r    LocalEntryNotFoundError.__init__(  s    40r   r*   	r   r   r    r!   r"   r   r$   r%   r&   r'   s   @@r   rp   rp     s     $1 1 1r   rp   c                       ] tR tRtRtRtR# )BadRequestErrori-  a1  
Raised by `hf_raise_for_status` when the server returns a HTTP 400 error.

Example:

```py
>>> resp = requests.post("hf.co/api/check", ...)
>>> hf_raise_for_status(resp, endpoint_name="check")
huggingface_hub.utils._errors.BadRequestError: Bad request for check endpoint: {details} (Request ID: XXX)
```
r*   Nr+   r*   r   r   rw   rw   -  s    
r   rw   c                       ] tR tRtRtRtR# )	DDUFErrori>  z5Base exception for errors related to the DDUF format.r*   Nr+   r*   r   r   ry   ry   >  s    ?r   ry   c                       ] tR tRtRtRtR# )DDUFCorruptedFileErroriB  z1Exception thrown when the DDUF file is corrupted.r*   Nr+   r*   r   r   r{   r{   B      ;r   r{   c                       ] tR tRtRtRtR# )DDUFExportErroriF  z-Base exception for errors during DDUF export.r*   Nr+   r*   r   r   r~   r~   F  s    7r   r~   c                       ] tR tRtRtRtR# )DDUFInvalidEntryNameErroriJ  z0Exception thrown when the entry name is invalid.r*   Nr+   r*   r   r   r   r   J  r.   r   r   c                       ] tR tRtRtRtR# )StrictDataclassErroriQ  z&Base exception for strict dataclasses.r*   Nr+   r*   r   r   r   r   Q  s    0r   r   c                       ] tR tRtRtRtR# )StrictDataclassDefinitionErroriU  z@Exception thrown when a strict dataclass is defined incorrectly.r*   Nr+   r*   r   r   r   r   U  s    Jr   r   c                   B   a a ] tR tRt oRtV3R lV 3R lltRtVtV ;t# )#StrictDataclassFieldValidationErroriY  zLException thrown when a strict dataclass fails validation for a given field.c                &   < V ^8  d   QhRS[ RS[/# )r
   fieldcauser   	Exception)r   r   s   "r   r   0StrictDataclassFieldValidationError.__annotate__\  s     ( (c () (r   c                x   < R V R2pVRVP                   P                   RV 2,          p\        SV `  V4       R# )zValidation error for field '':
    : Nr   r   r   r   )r   r   r   error_messager   s   &&& r   r   ,StrictDataclassFieldValidationError.__init__\  s@    6ugR@6%//":":!;2eWEE'r   r*   ru   r'   s   @@r   r   r   Y  s     V( ( (r   r   c                   B   a a ] tR tRt oRtV3R lV 3R lltRtVtV ;t# )#StrictDataclassClassValidationErrorib  zOException thrown when a strict dataclass fails validation on a class validator.c                &   < V ^8  d   QhRS[ RS[/# )r
   	validatorr   r   )r   r   s   "r   r   0StrictDataclassClassValidationError.__annotate__e  s     ( (# (i (r   c                x   < R V R2pVRVP                   P                   RV 2,          p\        SV `  V4       R# )z&Class validation error for validator 'r   r   r   Nr   )r   r   r   r   r   s   &&& r   r   ,StrictDataclassClassValidationError.__init__e  s@    @2N6%//":":!;2eWEE'r   r*   ru   r'   s   @@r   r   r   b  s     Y( ( (r   r   c                       ] tR tRtRtRtR# )XetErrorin  z1Base exception for errors related to Xet Storage.r*   Nr+   r*   r   r   r   r   n  r|   r   r   c                       ] tR tRtRtRtR# )XetAuthorizationErrorir  zXException thrown when the user does not have the right authorization to use Xet Storage.r*   Nr+   r*   r   r   r   r   r  s    br   r   c                       ] tR tRtRtRtR# )XetRefreshTokenErroriv  z3Exception thrown when the refresh token is invalid.r*   Nr+   r*   r   r   r   r   v  rS   r   r   c                       ] tR tRtRtRtR# )XetDownloadErroriz  z:Exception thrown when the download from Xet Storage fails.r*   Nr+   r*   r   r   r   r   z  s    Dr   r   N)5r"   pathlibr   typingr   r   requestsr   r   r   r   r)   EnvironmentErrorr-   ConnectionErrorr0   r2   TimeoutErrorrG   rI   rK   rM   rP   rR   rU   rW   r[   r]   r_   
ValueErrorra   OSErrorrc   re   rg   ri   rl   rn   FileNotFoundErrorrp   rw   ry   r{   r~   r   r   r   r   r   r   r   r   r   r*   r   r   <module>r      s   !  " (#I #Ri R;. ;_? _0IY 0IlMI| MCY CG$:L Gi y >) >
() (	) 		) 		 3 		& 	
  n *, , *N & $102CZ 10nj "@	 @<Y <8i 8; ;19 1K%9 K(*> ((*> (<y <cH c>8 >Ey Er   