python/cpython
Documented errors, page 2 of 5. Back to python/cpython
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| invalid file: %r | exception | error | io, file, open, typeerror, path |
| seek() returned invalid position | exception | error | python, io, seek, custom-file-object, oserror |
| generator ignored GeneratorExit | exception | error | generator, generator-exit, collections-abc, iterator-protocol |
| was slated for removal after Python alpha | exception | critical | warnings, deprecated, runtimeerror, cpython-internal, stdlib |
| is not part of stable ABI. Document it as `c:macro::`… | exception | error | asyncio, event-loop, nested-loop, entrypoint |
| profiling_trace: Placeholder pattern not found in | exception | error | asyncio, file-descriptor, validation, selector |
| unknown mode: %r | exception | error | io, open, mode, valueerror, defensive |
| Inconsistent use of dash separator | exception | error | datetime, fromisoformat, iso-week, separator, valueerror, stdlib |
| ObjC runtime library couldn't be loaded | exception | error | ios, ctypes, platform, import-error |
| unsupported | exception | error | markup, html-parser, dtd, parsing |
| dt.tzinfo is not self | exception | error | datetime, timezone, valueerror, fromutc |
| expect a list of futures, not | exception | error | asyncio, tasks, wait, type-error |
| object does not appear to be compatible with asyncio.Future | validation | warning | asyncio, future, debugging, typeerror |
| Argument expected for the -%c option\n | console | error | cli, command-line, getopt, cpython, arguments |
| Failed to encode latin1 string when unpickling a datetime… | exception | error | datetime, pickle, valueerror, python2-migration, encoding |
| Unsupported major version | exception | error | ast, parsing, feature-version, valueerror |
| ambiguous option: %(option)s could match %(matches)s | exception | error | argparse, cli, abbreviation, ambiguous-option |
| Expected a list of types, an ellipsis, ParamSpec, or… | exception | error | typing, collections-abc, type-hints, developer-error |
| unexpected '[' char in declaration | exception | error | markup, html-parser, parsing, malformed-html |
| a coroutine was expected, got | exception | error | asyncio, tasks, type-error, api-misuse |
| unexpected char in internal subset (in %r) | exception | error | markup, html-parser, dtd, doctype, parsing |
| warnings.showwarning() must be set to a function or method | exception | error | warnings, hook, configuration |
| Cannot exit %r without entering first | exception | error | warnings, context-manager, runtimeerror, stdlib |
| date argument must be a date instance | exception | error | datetime, combine, typeerror, parsing |
| readinto returned outside buffer size | exception | error | io, readinto, custom-stream, invariant, valueerror |
| ' ' is a bad directive in format | exception | error | strptime, format-string, directive, cpython |
| negative seek position %r | exception | error | io, bytesio, seek, whence, valueerror |
| offset must be a non-negative integer | exception | error | asyncio, sendfile, type-error, validation |
| __getstate__ on closed file | exception | error | io, bytesio, pickle, lifecycle, valueerror |
| Expected Theme object, found | exception | error | colorize, cpython-internals, terminal, developer-error |
| 'NoneType' object cannot be interpreted as an integer | exception | error | datetime, typeerror, timestamp, null-handling |
| write() argument must be str, not | validation | warning | asyncio, udp, socket, debug-mode, buffer |
| division by zero | exception | error | python, arithmetic, zerodivision, stdlib, bignum |
EISDIR Is a directory | exception | error | python, io, file-io, eisdir, isadirectoryerror |
| is not an integer | exception | error | io, typeerror, readline, argument-validation |
| the following arguments are required | exception | error | argparse, cli, required-argument, missing-argument |
| invalid choice: %(value)r (choose from %(choices)s) | exception | error | argparse, cli, choices, validation |
| fromutc() requires a datetime argument | exception | error | datetime, timezone, typeerror, fromutc |
| invalid option name for BooleanOptionalAction | exception | error | python, argparse, cli, boolean-optional-action, option-naming |
| module 'collections.abc' has no attribute | exception | error | collections-abc, attributeerror, deprecation, developer-error |
| . () not supported | exception | error | io, stream, unsupported-operation, oserror, subclassing |
| skip_file_prefixes must be a tuple of strs. | exception | error | warnings, validation, tuple, stacklevel |
| termios failure ( ) | console | error | python, pyrepl, termios, tty, unix, initialization |
| The VALUE_WITH_FAKE_GLOBALS format is for internal use only | exception | error | python, annotations, pep649, api-misuse, format-enum |
| unable to write; sendfile is in progress | exception | error | asyncio, networking, sendfile, concurrency, transport |
| coroutine ignored GeneratorExit | exception | error | asyncio, coroutine, generator-exit, collections-abc |
| _markupbase.ParserBase must be subclassed | exception | error | markup, html-parser, cpython-internals, developer-error |
| transport is not supported by start_tls() | exception | error | asyncio, tls, transport, start-tls |
| Day of month directive | exception | error | strptime, datetime, format-string, cpython |
| fromutc: dt.tzinfo is not self | exception | error | python, datetime, timezone, value-error, utc |
| data argument must be a bytes, bytearray, or memoryview… | exception | error | asyncio, networking, typeerror, transport, serialization |
| Cannot call write() after write_eof() | exception | error | asyncio, networking, transport, eof, protocol-ordering |
| deprecated-removed:: second argument cannot be `next` | validation | error | asyncio, event-loop, lifecycle, selector |
| Transport is closing | exception | error | asyncio, sendfile, transport, shutdown, race-condition |
| AIX_BUILDDATE is not defined or invalid | validation | warning | asyncio, socket, debug-mode, non-blocking |
| \C- followed by invalid key | validation | error | python, pyrepl, keymap, ctrl-key, parsing |
| expected AST, got %r | exception | error | ast, dump, typeerror, debugging |
| write to closed file | exception | error | io, bytesio, write, lifecycle, valueerror |
| does not have annotations | exception | error | python, annotations, typeerror, introspection |
| () called while another coroutine is already waiting for… | exception | error | asyncio, streams, concurrency, single-consumer |
| Unexpected node inside JoinedStr | exception | error | ast, f-string, codegen, ast-unparse |
EAGAIN write could not complete without blocking | exception | warning | python, io, buffered-writer, blockingioerror, eagain, nonblocking, backpressure |
| Passing coroutines is forbidden, use tasks explicitly. | exception | error | asyncio, python, coroutine, tasks, concurrency |
| write() argument must be bytes-like, not | validation | warning | asyncio, udp, socket, debug-mode |
| reuse_port not supported by socket module | exception | error | asyncio, sockets, so-reuseport, platform-support |
| seek() returned an invalid position | exception | error | io, seek, custom-stream, invariant, oserror |
| asynchronous generator ignored GeneratorExit | exception | error | asyncio, async-generator, generator-exit, collections-abc |
| 'import warnings' failed; traceback:\n | console | error | cpython, startup, import, warnings, stdlib |
| issubclass() arg 1 must be a class | exception | error | abc, issubclass, typing, runtime |
| \C must be followed by | validation | error | python, pyrepl, keymap, parsing, repl |
| high (%r) must be >= low (%r) must be >= 0 | exception | error | asyncio, ssl, flow-control, backpressure, configuration |
| unknown backslash escape | validation | error | python, pyrepl, keymap, parsing, escapes |
| ISO week directive ' ' must be used with the ISO year… | exception | error | strptime, iso-week, datetime, format-string, cpython |
| Unknown option: %ls\n | console | error | cli, getopt, command-line, unknown-option, cpython |
| unrecognized arguments | exception | error | python, argparse, cli, unknown-arguments, user-input |
| annotate function does not support VALUE format | exception | error | python, annotations, pep649, contract-violation, runtimeerror |
| Must have exactly one of create/read/write/append mode and… | validation | error | python, io, file-io, mode, valueerror |
| No history item at position | validation | error | python, pyrepl, readline, history, off-by-one |
| stdlib ssl module not available | exception | critical | asyncio, ssl, environment, build-issue, runtime-error |
| tzinfo. () must return None or timedelta, not | exception | error | datetime, tzinfo, typeerror, timezone |
| Unknown timespec value | exception | error | datetime, isoformat, timespec, valueerror, stdlib |
| cannot mix naive and timezone-aware time | exception | error | python, datetime, timezone, type-error, arithmetic |
| Expected an object of type str for 'message', not | exception | error | warnings, deprecated, typeerror, decorator, stdlib |
| server_hostname is only meaningful with ssl | exception | error | asyncio, tls, ssl, validation, network |
| Server side SSL needs a valid SSLContext | exception | error | asyncio, ssl, tls, server, sslcontext, valueerror |
| Unknown thread safety level | validation | error | asyncio, typeerror, coroutine, runner |
| must be str, not | exception | error | datetime, typeerror, formatting, bytes |
| File or stream is not writable. | exception | error | io, stream, write, mode, unsupported-operation |
| minute, second, and microsecond must be 0 when hour is 24 | exception | error | python, datetime, value-error, iso8601, parsing |
| unable to writelines; sendfile is in progress | exception | error | asyncio, networking, sendfile, writelines, concurrency |
| expected integer from opener | validation | error | python, io, file-io, opener, typeerror |
| timedelta # of days is too large | exception | error | datetime, overflowerror, timedelta, arithmetic |
| --check-hash-based-pycs must be one of 'default', 'always'… | validation | error | cli, cpython, pyc, validation, startup |
| pop from empty WeakSet | exception | error | weakref, weakset, keyerror, garbage-collection, cpython |
| The third value in the tuple must be an integer, or one of… | exception | error | decimal, constructor, tuple, exponent, special-values, valueerror |
| expects an iterable of awaitables, not | exception | error | asyncio, python, as-completed, argument-validation |
| Cannot use closefd=False with file name | validation | error | python, io, file-io, closefd, valueerror |
| offset must be a timedelta strictly between… | exception | error | datetime, tzinfo, valueerror, timezone |
| lineno must be an int | exception | error | warnings, validation, lineno, filters |
| cannot pickle object | exception | error | io, pickle, serialization, typeerror, multiprocessing |