
    hY                        S SK JrJrJr  S SKJr  SSKJr  SSKJ	r	  SSK
JrJrJr   " S S\5      r " S	 S
\5      r " S S\\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r  " S) S*\5      r!g+),    )AnyOptionalUnion)HfFileSystem   )config)	CastError)TrackedIterableFromGeneratortracked_listtracked_strc                       \ rS rSrSrSrg)DatasetsError   z*Base class for exceptions in this library. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       M/home/james-whalen/.local/lib/python3.13/site-packages/datasets/exceptions.pyr   r      s    4r   r   c                       \ rS rSrSrSrg)DefunctDatasetError   zThe dataset has been defunct.r   Nr   r   r   r   r   r      s    'r   r   c                       \ rS rSrSrSrg)FileNotFoundDatasetsError   z)FileNotFoundError raised by this library.r   Nr   r   r   r   r   r          3r   r   c                       \ rS rSrSrSrg)DataFilesNotFoundError   z No (supported) data files found.r   Nr   r   r   r   r"   r"      s    *r   r"   c                       \ rS rSrSrSrg)DatasetNotFoundError   zDataset not found.

Raised when trying to access:
- a missing dataset, or
- a private/gated dataset and the user is not authenticated.
r   Nr   r   r   r   r%   r%      s    r   r%   c                       \ rS rSrSrg)DatasetBuildError%   r   Nr   r   r   r   r   r   r   r   r(   r(   %       r   r(   c                       \ rS rSrSrg)ManualDownloadError)   r   Nr*   r   r   r   r-   r-   )   r+   r   r-   c                       \ rS rSrSrg)FileFormatError-   r   Nr*   r   r   r   r0   r0   -   r+   r   r0   c                       \ rS rSrSrg)DatasetGenerationError1   r   Nr*   r   r   r   r3   r3   1   r+   r   r3   c                   V    \ rS rSr\S\S\S\\\4   S\	\
\\4      SS 4
S j5       rSrg	)
DatasetGenerationCastError5   
cast_errorbuilder_name
gen_kwargstokenreturnc                    SUR                  5        3n/ nUR                  5        GHl  n[        U[        [        [
        45      (       d  M&  [        U[        [
        45      (       aC  UR                  b6  UR                  n[        U[        [
        45      (       a  UR                  b  M6  [        U[        5      (       a  UR                  5       n[        U[        5      (       a  UR                  S5      (       a~  [        [        R                  US9R                  U5      nSUR                  5       -   nSUR                  -   U;   a1  UR!                  SUR                  -   SS5      SUR                   S3-   nUR#                  [        U5      5        GMo     U(       a  US	U S
SR%                  U5       3-  nSn	U " SU-   U	-   5      $ )NzC

All the data files must have the same columns, but at some point zhf://)endpointr;   @ r   z (at revision )z

This happened while the z, dataset builder was generating data using

z, z

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)z.An error occurred while generating the dataset)detailsvalues
isinstancer   r   r
   	last_item
get_originstr
startswithr   r   HF_ENDPOINTresolve_path	unresolverevisionreplaceappendjoin)
clsr8   r9   r:   r;   explanation_messageformatted_tracked_gen_kwargs	gen_kwargresolved_pathhelp_messages
             r   from_cast_error*DatasetGenerationCastError.from_cast_error6   s    TT^TfTfThSij 	 35$#**,Ii+|Ea)bcc9|5Q&RSSXaXkXkXw%//	 9|5Q&RSSXaXkXkXw )[11%002	)S))i.B.B7.K.K ,f6H6HPU V c cdm n#m&=&=&??	///9<!))#0F0F*FAN*=+A+A*B!DE  )//I?# -$ (%A,O}  C  H  H  Ie  f  ~g  $h  h cCFYY\hhiir   r   N)r   r   r   r   classmethodr	   rG   dictr   r   r   boolrV   r   r   r   r   r6   r6   5   sa     j j  j cN	 j
 dCi() j 
& j  jr   r6   c                       \ rS rSrSrSrg)ChecksumVerificationErrorZ   z@Error raised during checksums verifications of downloaded files.r   Nr   r   r   r   r\   r\   Z   s    Jr   r\   c                       \ rS rSrSrSrg)UnexpectedDownloadedFileError^   z(Some downloaded files were not expected.r   Nr   r   r   r   r_   r_   ^   s    2r   r_   c                       \ rS rSrSrSrg) ExpectedMoreDownloadedFilesErrorb   z7Some files were supposed to be downloaded but were not.r   Nr   r   r   r   rb   rb   b       Ar   rb   c                       \ rS rSrSrSrg)NonMatchingChecksumErrorf   z?The downloaded file checksum don't match the expected checksum.r   Nr   r   r   r   rf   rf   f   s    Ir   rf   c                       \ rS rSrSrSrg)SplitsVerificationErrorj   z)Error raised during splits verifications.r   Nr   r   r   r   ri   ri   j   r    r   ri   c                       \ rS rSrSrSrg)UnexpectedSplitsErrorn   z6The expected splits of the downloaded file is missing.r   Nr   r   r   r   rl   rl   n   s    @r   rl   c                       \ rS rSrSrSrg)ExpectedMoreSplitsErrorr   z!Some recorded splits are missing.r   Nr   r   r   r   ro   ro   r   s    +r   ro   c                       \ rS rSrSrSrg)NonMatchingSplitsSizesErrorv   z7The splits sizes don't match the expected splits sizes.r   Nr   r   r   r   rr   rr   v   rd   r   rr   N)"typingr   r   r   huggingface_hubr   r@   r   tabler	   utils.trackr
   r   r   	Exceptionr   r   FileNotFoundErrorr   r"   r%   r(   r-   r0   r3   r6   r\   r_   rb   rf   ri   rl   ro   rr   r   r   r   <module>rz      s   ( ' (   P P5I 5(- (4/@ 4+6 +4 	 		+ 		' 		. 	"j!7 "jJK K3$= 3B'@ BJ8 J4m 4A3 A,5 ,B"9 Br   