Return to main page
Python Errors
AttributeError- 'str' object has no attribute 'length'
IndentationError- unexpected indent
IndexError string index out of range
IOError: [Errno 2] No such file or directory: 'foo.txt'
IOError: File not open for writing
KeyError- 'a'
NameError: global name 'hello' is not defined
RuntimeError- Set changed size during iteration
SyntaxError invalid syntax
SyntaxError- EOL while scanning string literal
TypeError 'str' object does not support item assignment
TypeError- 'dict' object is not callable
TypeError- expected a character buffer object.xml
TypeError- range() integer end argument expected, got list.
TypeError- unsupported operand type(s) for +- 'int' and 'str'
UnboundLocalError- local variable 'num' referenced before assignment
ZeroDivisionError- integer division or modulo by zero
Helpful links
Python built in exceptions
Common runtime errors