Pythonのエラー一覧と解決方法(20件)
実在のPythonエラーメッセージを収録。各ページで原因と直し方を日本語で解説しています。
- ModuleNotFoundError: No module named 'requests'
- IndentationError: unexpected indent
- TypeError: 'NoneType' object is not subscriptable
- ImportError: attempted relative import with no known parent package
- ValueError: invalid literal for int() with base 10
- AttributeError: 'NoneType' object has no attribute 'x'
- KeyError: 'name'
- UnicodeDecodeError: 'utf-8' codec can't decode byte
- RecursionError: maximum recursion depth exceeded
- TypeError: unsupported operand type(s) for +: 'int' and 'str'
- FileNotFoundError: [Errno 2] No such file or directory
- error: externally-managed-environment
- SyntaxError: invalid syntax
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- RuntimeError: dictionary changed size during iteration
- ImportError: cannot import name 'X' from partially initialized module
- TypeError: f() missing 1 required positional argument
- ZeroDivisionError: division by zero
- OSError: [Errno 98] Address already in use
- IndentationError: expected an indented block
エラー文を貼って探すならエラーメッセージ検索ツールが便利です。