UnicodeDecodeErrorUnicodeDecodeError
A byte sequence could not be decoded using the specified encoding.
BrokenPipeErrorAn attempt was made to write to a pipe or socket whose reading end has been closed.
You wrote data to a connection/pipe after the receiving end was closed. Common scenarios: writing to stdout when it is piped to a process that exited (e.g., python script.py | head), or sending data after the client disconnected.
Handle BrokenPipeError gracefully, especially for stdout. Use signal.signal(signal.SIGPIPE, signal.SIG_DFL) to restore default pipe behavior. Check if the connection is still open before writing. Use try-except around write operations.
UnicodeDecodeErrorA byte sequence could not be decoded using the specified encoding.
ImportErrorAn import statement failed to find or load the specified module or name.
IndexErrorA sequence index is out of the valid range for the given sequence.
StopAsyncIterationRaised by an async iterator's __anext__() method to signal that iteration is complete.
FileNotFoundErrorThe specified file or directory does not exist.
RecursionErrorThe maximum recursion depth was exceeded.