SyntaxErrorSyntaxError
Python encountered invalid syntax that cannot be parsed.
IndentationErrorThe code has incorrect indentation, which is syntactically significant in Python.
Python requires consistent indentation for code blocks. This error occurs when mixing tabs and spaces, using incorrect indentation levels, or when the indentation does not match the expected block structure.
Use consistent indentation (4 spaces per level is standard). Configure your editor to insert spaces instead of tabs. Run: python -tt script.py to detect tab/space mixing. Most editors have a 'convert indentation' feature.
def foo():
print("bad indent") # IndentationErrorSyntaxErrorPython encountered invalid syntax that cannot be parsed.
AttributeErrorAn object does not have the requested attribute or method.
UnicodeEncodeErrorA Unicode string could not be encoded to the target encoding.
requests.exceptions.TimeoutA request timed out while waiting for a response from the server.
ConnectionRefusedErrorThe connection was refused because no server is listening on the target address.
BrokenPipeErrorAn attempt was made to write to a pipe or socket whose reading end has been closed.