PermissionErrorPermissionError
The operation is not permitted due to insufficient file system permissions.
UnboundLocalErrorA local variable was referenced before it was assigned a value.
You read a variable before assigning to it within the same function. Python sees the assignment and treats the variable as local for the entire function, so reading it before the assignment fails. This often happens when trying to modify a global variable without the global keyword.
Use the global keyword to reference global variables: global x. Or use nonlocal for enclosing scope variables. Restructure code to assign the variable before reading it. Pass the value as a function parameter instead.
x = 10
def f(): print(x); x = 20
f() # UnboundLocalErrorPermissionErrorThe operation is not permitted due to insufficient file system permissions.
concurrent.futures.TimeoutErrorA Future did not complete within the specified timeout period.
IOErrorAn I/O operation failed. IOError is an alias for OSError in Python 3.
MemoryErrorThe Python interpreter ran out of available memory.
SyntaxErrorPython encountered invalid syntax that cannot be parsed.
FutureWarningA warning about behavior that will change in a future version.