1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
U
·ý°d½ã@sªddlZddlmZGdd„deƒZGdd„deeƒZGdd    „d    eƒZGd
d „d eƒZGd d „d eƒZGdd„deƒZ    Gdd„deƒZ
Gdd„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZiZdd„Zee ejejejejejejejejejejejejejƒee    ejejejej ej!ej"ej#ej$ej%ƒ
ee ej&ej'ej(ej)ej*ej+ej,ƒeeej-ej.ej/ej0ƒee
ej1ej2ej3ej4ej5ej6ej7ƒ[[dd„Z8dS)éNé)ÚERc@seZdZdZdS)Ú
MySQLErrorz*Exception related to operation with MySQL.N©Ú__name__Ú
__module__Ú __qualname__Ú__doc__©r
r
úBd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pymysql/err.pyrsrc@seZdZdZdS)ÚWarningzWException raised for important warnings like data truncations
    while inserting, etc.Nrr
r
r
r r
sr c@seZdZdZdS)ÚErrorzQException that is the base class of all other error exceptions
    (not Warning).Nrr
r
r
r r sr c@seZdZdZdS)ÚInterfaceErrorzkException raised for errors that are related to the database
    interface rather than the database itself.Nrr
r
r
r rsrc@seZdZdZdS)Ú DatabaseErrorzAException raised for errors that are related to the
    database.Nrr
r
r
r rsrc@seZdZdZdS)Ú    DataErrorzŒException raised for errors that are due to problems with the
    processed data like division by zero, numeric value out of range,
    etc.Nrr
r
r
r rsrc@seZdZdZdS)ÚOperationalErrora;Exception raised for errors that are related to the database's
    operation and not necessarily under the control of the programmer,
    e.g. an unexpected disconnect occurs, the data source name is not
    found, a transaction could not be processed, a memory allocation
    error occurred during processing, etc.Nrr
r
r
r r$src@seZdZdZdS)ÚIntegrityErrorz‡Exception raised when the relational integrity of the database
    is affected, e.g. a foreign key check fails, duplicate key,
    etc.Nrr
r
r
r r,src@seZdZdZdS)Ú InternalErrorz“Exception raised when the database encounters an internal
    error, e.g. the cursor is not valid anymore, the transaction is
    out of sync, etc.Nrr
r
r
r r2src@seZdZdZdS)ÚProgrammingErrorz¦Exception raised for programming errors, e.g. table not found
    or already exists, syntax error in the SQL statement, wrong number
    of parameters specified, etc.Nrr
r
r
r r8src@seZdZdZdS)ÚNotSupportedErrorzÞException raised in case a method or database API was used
    which is not supported by the database, e.g. requesting a
    .rollback() on a connection that does not support transaction or
    has transactions turned off.Nrr
r
r
r r>srcGs|D] }|t|<qdS)N)Ú    error_map)ÚexcÚerrorsÚerrorr
r
r Ú
_map_errorHsrcCs\t d|dd…¡d}|dd… dd¡}t |¡}|dkrN|dkrJtnt}|||ƒ‚dS)    Nz<hréré    zutf-8Úreplaceiè)ÚstructÚunpackÚdecoderÚgetrr)ÚdataÚerrnoZerrvalZ
errorclassr
r
r Úraise_mysql_exception‰s 
r$)9rÚ    constantsrÚ    Exceptionrr r rrrrrrrrrrZDB_CREATE_EXISTSZ SYNTAX_ERRORÚ PARSE_ERRORZ NO_SUCH_TABLEZ WRONG_DB_NAMEZWRONG_TABLE_NAMEZFIELD_SPECIFIED_TWICEZINVALID_GROUP_FUNC_USEÚUNSUPPORTED_EXTENSIONZTABLE_MUST_HAVE_COLUMNSZ"CANT_DO_THIS_DURING_AN_TRANSACTIONZWRONG_COLUMN_NAMEZWARN_DATA_TRUNCATEDZWARN_NULL_TO_NOTNULLZWARN_DATA_OUT_OF_RANGEÚ
NO_DEFAULTZPRIMARY_CANT_HAVE_NULLZ DATA_TOO_LONGZDATETIME_FUNCTION_OVERFLOWZTRUNCATED_WRONG_VALUE_FOR_FIELDZILLEGAL_VALUE_FOR_TYPEZ    DUP_ENTRYZNO_REFERENCED_ROWZNO_REFERENCED_ROW_2ZROW_IS_REFERENCEDZROW_IS_REFERENCED_2ZCANNOT_ADD_FOREIGNZBAD_NULL_ERRORZWARNING_NOT_COMPLETE_ROLLBACKZNOT_SUPPORTED_YETZFEATURE_DISABLEDZUNKNOWN_STORAGE_ENGINEZDBACCESS_DENIED_ERRORZACCESS_DENIED_ERRORZCON_COUNT_ERRORZTABLEACCESS_DENIED_ERRORZCOLUMNACCESS_DENIED_ERRORZCONSTRAINT_FAILEDZ LOCK_DEADLOCKr$r
r
r
r Ú<module>sŽ òö ø
ûø