Python Standard Exception topic
Assertionerror Assertion Statement
(assert) failed
Attributeerror attempting to access an unknown object property
Eoferror user input file End flag EOF (CTRL+D)
Floatingpointerror floating-point calculation error
When the Generatorexitgenerator.close () method is called
Importerror when the Import module fails
Indexerror index out of range of sequence
Find a non-existent keyword in the Keyerror dictionary
Keyboardinterrupt user input interrupt key (CTRL + C)
Memoryerror Memory Overflow (can free memory by deleting objects)
Nameerror attempting to access a non-existent variable
Notimplementederror methods that have not yet been implemented
OSError exceptions generated by the operating system (for example, opening a nonexistent file)
Overflowerror numeric operation exceeds maximum limit
Referenceerror Weak reference (weak reference) attempts to access an object that has been reclaimed by the garbage collection mechanism
RuntimeError General run-time errors
Stopiteration iterator with no more values
Syntax error for SyntaxError python
Indentationerror Indent Error
Taberror tab and spaces mixed use
Systemerrorpython Compiler system error
Systemexitpython compiler process is closed
TypeError invalid operations between different types
Unboundlocalerror access to an uninitialized local variable (subclass of Nameerror)
Unicodeerror Unicode-related errors (subclasses of ValueError)
Error Unicodeencodeerror Unicode encoding (subclass of Unicodeerror) Unicodedecodeerror
Error in Unicode decoding (subclass of Unicodeerror)
Unicodetranslateerror Error in Unicode conversion (subclass of Unicodeerror)
ValueError invalid arguments passed in
Zerodivisionerror Divisor is zero
Python built-in hierarchy of exception classes:
Baseexception
+--Systemexit
+--Keyboardinterrupt
+--Generatorexit
+--Exception
+--stopiteration
+--Arithmeticerror
| +--Floatingpointerror
| +--Overflowerror
| +--Zerodivisionerror
+--Assertionerror
+--Attributeerror
+--Buffererror
+--Eoferror
+--Importerror
+--Lookuperror
| +--Indexerror
| +--Keyerror
+--Memoryerror
+--Nameerror
| +--Unboundlocalerror
+--OSError
| +--Blockingioerror
| +--Childprocesserror
| +--Connectionerror
| | +--Brokenpipeerror
| | +--Connectionabortederror
| | +--Connectionrefusederror
| | +--Connectionreseterror
| +--Fileexistserror
| +--Filenotfounderror
| +--Interruptederror
| +--Isadirectoryerror
| +--Notadirectoryerror
| +--Permissionerror
| +--Processlookuperror
| +--Timeouterror
+--Referenceerror
+--RuntimeError
| +--Notimplementederror
+--SyntaxError
| +--Indentationerror
| +--Taberror
+--Systemerror
+--TypeError
+--ValueError
| +--Unicodeerror
| +--Unicodedecodeerror
| +--Unicodeencodeerror
| +--Unicodetranslateerror
+--Warning
+--deprecationwarning
+--pendingdeprecationwarning
+--runtimewarning
+--syntaxwarning
+--userwarning
+--futurewarning
+--importwarning
+--unicodewarning
+--byteswarning
+--resourcewarning
Python Standard Exception topic