diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index d8033663ea8eac..dc0e573fed4c26 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -20,684 +20,436 @@ all-inclusive. To translate a numeric error code to an error message, use :func:`os.strerror`. -Of the following list, symbols that are not used on the current platform are not +Of the following table, symbols that are not used on the current platform are not defined by the module. The specific list of defined symbols is available as ``errno.errorcode.keys()``. Symbols available can include: -.. data:: EPERM +.. list-table:: + :header-rows: 1 - Operation not permitted. This error is mapped to the exception - :exc:`PermissionError`. + * - Name + - Description + * - .. data:: EPERM + - Operation not permitted [#PermissionError]_ -.. data:: ENOENT + * - .. data:: ENOENT + - No such file or directory [#FileNotFoundError]_ - No such file or directory. This error is mapped to the exception - :exc:`FileNotFoundError`. + * - .. data:: ESRCH + - No such process [#ProcessLookupError]_ + * - .. data:: EINTR + - Interrupted system call [#InterruptedError]_ -.. data:: ESRCH + * - .. data:: EIO + - I/O error - No such process. This error is mapped to the exception - :exc:`ProcessLookupError`. + * - .. data:: ENXIO + - No such device or address + * - .. data:: E2BIG + - Argument list too long -.. data:: EINTR + * - .. data:: ENOEXEC + - Exec format error - Interrupted system call. This error is mapped to the exception - :exc:`InterruptedError`. + * - .. data:: EBADF + - Bad file number + * - .. data:: ECHILD + - No child processes [#ChildProcessError]_ -.. data:: EIO + * - .. data:: EAGAIN + - Try again [#BlockingIOError]_ - I/O error + * - .. data:: ENOMEM + - Out of memory + * - .. data:: EACCES + - Permission denied [#PermissionError]_ -.. data:: ENXIO + * - .. data:: EFAULT + - Bad address - No such device or address + * - .. data:: ENOTBLK + - Block device required + * - .. data:: EBUSY + - Device or resource busy -.. data:: E2BIG + * - .. data:: EEXIST + - File exists [#FileExistsError]_ - Arg list too long + * - .. data:: EXDEV + - Cross-device link + * - .. data:: ENODEV + - No such device -.. data:: ENOEXEC + * - .. data:: ENOTDIR + - Not a directory [#NotADirectoryError]_ - Exec format error + * - .. data:: EISDIR + - Is a directory [#IsADirectoryError]_ + * - .. data:: EINVAL + - Invalid argument -.. data:: EBADF + * - .. data:: ENFILE + - File table overflow - Bad file number + * - .. data:: EMFILE + - Too many open files + * - .. data:: ENOTTY + - Not a typewriter -.. data:: ECHILD + * - .. data:: ETXTBSY + - Text file busy - No child processes. This error is mapped to the exception - :exc:`ChildProcessError`. + * - .. data:: EFBIG + - File too large + * - .. data:: ENOSPC + - No space left on device -.. data:: EAGAIN + * - .. data:: ESPIPE + - Illegal seek - Try again. This error is mapped to the exception :exc:`BlockingIOError`. + * - .. data:: EROFS + - Read-only file system + * - .. data:: EMLINK + - Too many links -.. data:: ENOMEM + * - .. data:: EPIPE + - Broken pipe [#BrokenPipeError]_ - Out of memory + * - .. data:: EDOM + - Math argument out of domain of func + * - .. data:: ERANGE + - Math result not representable -.. data:: EACCES + * - .. data:: EDEADLK + - Resource deadlock would occur - Permission denied. This error is mapped to the exception - :exc:`PermissionError`. + * - .. data:: ENAMETOOLONG + - File name too long + * - .. data:: ENOLCK + - No record locks available -.. data:: EFAULT + * - .. data:: ENOSYS + - Function not implemented - Bad address + * - .. data:: ENOTEMPTY + - Directory not empty + * - .. data:: ELOOP + - Too many symbolic links encountered -.. data:: ENOTBLK + * - .. data:: EWOULDBLOCK + - Operation would block [#BlockingIOError]_ - Block device required + * - .. data:: ENOMSG + - No message of desired type + * - .. data:: EIDRM + - Identifier removed -.. data:: EBUSY + * - .. data:: ECHRNG + - Channel number out of range - Device or resource busy + * - .. data:: EL2NSYNC + - Level 2 not synchronized + * - .. data:: EL3HLT + - Level 3 halted -.. data:: EEXIST + * - .. data:: EL3RST + - Level 3 reset - File exists. This error is mapped to the exception - :exc:`FileExistsError`. + * - .. data:: ELNRNG + - Link number out of range + * - .. data:: EUNATCH + - Protocol driver not attached -.. data:: EXDEV + * - .. data:: ENOCSI + - No CSI structure available - Cross-device link + * - .. data:: EL2HLT + - Level 2 halted + * - .. data:: EBADE + - Invalid exchange -.. data:: ENODEV + * - .. data:: EBADR + - Invalid request descriptor - No such device + * - .. data:: EXFULL + - Exchange full + * - .. data:: ENOANO + - No anode -.. data:: ENOTDIR + * - .. data:: EBADRQC + - Invalid request code - Not a directory. This error is mapped to the exception - :exc:`NotADirectoryError`. + * - .. data:: EBADSLT + - Invalid slot + * - .. data:: EDEADLOCK + - File locking deadlock error -.. data:: EISDIR + * - .. data:: EBFONT + - Bad font file format - Is a directory. This error is mapped to the exception - :exc:`IsADirectoryError`. + * - .. data:: ENOSTR + - Device not a stream + * - .. data:: ENODATA + - No data available -.. data:: EINVAL + * - .. data:: ETIME + - Timer expired - Invalid argument + * - .. data:: ENOSR + - Out of streams resources + * - .. data:: ENONET + - Machine is not on the network -.. data:: ENFILE + * - .. data:: ENOPKG + - Package not installed - File table overflow + * - .. data:: EREMOTE + - Object is remote + * - .. data:: ENOLINK + - Link has been severed -.. data:: EMFILE + * - .. data:: EADV + - Advertise error - Too many open files + * - .. data:: ESRMNT + - Srmount error + * - .. data:: ECOMM + - Communication error on send -.. data:: ENOTTY + * - .. data:: EPROTO + - Protocol error - Not a typewriter + * - .. data:: EMULTIHOP + - Multihop attempted + * - .. data:: EDOTDOT + - RFS specific error -.. data:: ETXTBSY + * - .. data:: EBADMSG + - Not a data message - Text file busy + * - .. data:: EOVERFLOW + - Value too large for defined data type + * - .. data:: ENOTUNIQ + - Name not unique on network -.. data:: EFBIG + * - .. data:: EBADFD + - File descriptor in bad state - File too large + * - .. data:: EREMCHG + - Remote address changed + * - .. data:: ELIBACC + - Can not access a needed shared library -.. data:: ENOSPC + * - .. data:: ELIBBAD + - Accessing a corrupted shared library - No space left on device + * - .. data:: ELIBSCN + - .lib section in a.out corrupted + * - .. data:: ELIBMAX + - Attempting to link in too many shared libraries -.. data:: ESPIPE + * - .. data:: ELIBEXEC + - Cannot exec a shared library directly - Illegal seek + * - .. data:: EILSEQ + - Illegal byte sequence + * - .. data:: ERESTART + - Interrupted system call should be restarted -.. data:: EROFS + * - .. data:: ESTRPIPE + - Streams pipe error - Read-only file system + * - .. data:: EUSERS + - Too many users + * - .. data:: ENOTSOCK + - Socket operation on non-socket -.. data:: EMLINK + * - .. data:: EDESTADDRREQ + - Destination address required - Too many links + * - .. data:: EMSGSIZE + - Message too long + * - .. data:: EPROTOTYPE + - Protocol wrong type for socket -.. data:: EPIPE + * - .. data:: ENOPROTOOPT + - Protocol not available - Broken pipe. This error is mapped to the exception - :exc:`BrokenPipeError`. + * - .. data:: EPROTONOSUPPORT + - Protocol not supported + * - .. data:: ESOCKTNOSUPPORT + - Socket type not supported -.. data:: EDOM + * - .. data:: EOPNOTSUPP + - Operation not supported on transport endpoint - Math argument out of domain of func + * - .. data:: ENOTSUP + - Operation not supported + * - .. data:: EPFNOSUPPORT + - Protocol family not supported -.. data:: ERANGE + * - .. data:: EAFNOSUPPORT + - Address family not supported by protocol - Math result not representable + * - .. data:: EADDRINUSE + - Address already in use + * - .. data:: EADDRNOTAVAIL + - Cannot assign requested address -.. data:: EDEADLK + * - .. data:: ENETDOWN + - Network is down - Resource deadlock would occur + * - .. data:: ENETUNREACH + - Network is unreachable + * - .. data:: ENETRESET + - Network dropped connection because of reset -.. data:: ENAMETOOLONG + * - .. data:: ECONNABORTED + - Software caused connection abort [#ConnectionAbortedError]_ - File name too long + * - .. data:: ECONNRESET + - Connection reset by peer [#ConnectionResetError]_ + * - .. data:: ENOBUFS + - No buffer space available -.. data:: ENOLCK + * - .. data:: EISCONN + - Transport endpoint is already connected - No record locks available + * - .. data:: ENOTCONN + - Transport endpoint is not connected + * - .. data:: ESHUTDOWN + - Cannot send after transport endpoint shutdown [#BrokenPipeError]_ -.. data:: ENOSYS + * - .. data:: ETOOMANYREFS + - Too many references: cannot splice - Function not implemented + * - .. data:: ETIMEDOUT + - Connection timed out [#TimeoutError]_ + * - .. data:: ECONNREFUSED + - Connection refused [#ConnectionRefusedError]_ -.. data:: ENOTEMPTY + * - .. data:: EHOSTDOWN + - Host is down - Directory not empty + * - .. data:: EHOSTUNREACH + - No route to host + * - .. data:: EHWPOISON + - Memory page has hardware error. -.. data:: ELOOP + * - .. data:: EALREADY + - Operation already in progress [#BlockingIOError]_ - Too many symbolic links encountered + * - .. data:: EINPROGRESS + - Operation now in progress [#BlockingIOError]_ + * - .. data:: ESTALE + - Stale NFS file handle -.. data:: EWOULDBLOCK + * - .. data:: EUCLEAN + - Structure needs cleaning - Operation would block. This error is mapped to the exception - :exc:`BlockingIOError`. + * - .. data:: ENOTNAM + - Not a XENIX named type file + * - .. data:: ENAVAIL + - No XENIX semaphores available -.. data:: ENOMSG + * - .. data:: EISNAM + - Is a named type file - No message of desired type + * - .. data:: EREMOTEIO + - Remote I/O error + * - .. data:: EDQUOT + - Quota exceeded -.. data:: EIDRM + * - .. data:: EQFULL + - Interface output queue is full - Identifier removed + * - .. data:: ENOTCAPABLE + - Capabilities insufficient [#PermissionError]_ + * - .. data:: ECANCELED + - Operation canceled -.. data:: ECHRNG + * - .. data:: EOWNERDEAD + - Owner died - Channel number out of range + * - .. data:: ENOTRECOVERABLE + - State not recoverable +.. versionadded:: 3.2 -.. data:: EL2NSYNC + * :data:`errno.ENOTSUP` + * :data:`errno.ECANCELED` + * :data:`errno.EOWNERDEAD` + * :data:`errno.ENOTRECOVERABLE` - Level 2 not synchronized +.. versionadded:: 3.11 + * :data:`errno.EQFULL` -.. data:: EL3HLT +.. versionadded:: 3.11.1 - Level 3 halted + * :data:`errno.ENOTCAPABLE` +.. versionadded:: 3.14 -.. data:: EL3RST + * :data:`errno.EHWPOISON` - Level 3 reset +.. rubric:: Footnotes - -.. data:: ELNRNG - - Link number out of range - - -.. data:: EUNATCH - - Protocol driver not attached - - -.. data:: ENOCSI - - No CSI structure available - - -.. data:: EL2HLT - - Level 2 halted - - -.. data:: EBADE - - Invalid exchange - - -.. data:: EBADR - - Invalid request descriptor - - -.. data:: EXFULL - - Exchange full - - -.. data:: ENOANO - - No anode - - -.. data:: EBADRQC - - Invalid request code - - -.. data:: EBADSLT - - Invalid slot - - -.. data:: EDEADLOCK - - File locking deadlock error - - -.. data:: EBFONT - - Bad font file format - - -.. data:: ENOSTR - - Device not a stream - - -.. data:: ENODATA - - No data available - - -.. data:: ETIME - - Timer expired - - -.. data:: ENOSR - - Out of streams resources - - -.. data:: ENONET - - Machine is not on the network - - -.. data:: ENOPKG - - Package not installed - - -.. data:: EREMOTE - - Object is remote - - -.. data:: ENOLINK - - Link has been severed - - -.. data:: EADV - - Advertise error - - -.. data:: ESRMNT - - Srmount error - - -.. data:: ECOMM - - Communication error on send - - -.. data:: EPROTO - - Protocol error - - -.. data:: EMULTIHOP - - Multihop attempted - - -.. data:: EDOTDOT - - RFS specific error - - -.. data:: EBADMSG - - Not a data message - - -.. data:: EOVERFLOW - - Value too large for defined data type - - -.. data:: ENOTUNIQ - - Name not unique on network - - -.. data:: EBADFD - - File descriptor in bad state - - -.. data:: EREMCHG - - Remote address changed - - -.. data:: ELIBACC - - Can not access a needed shared library - - -.. data:: ELIBBAD - - Accessing a corrupted shared library - - -.. data:: ELIBSCN - - .lib section in a.out corrupted - - -.. data:: ELIBMAX - - Attempting to link in too many shared libraries - - -.. data:: ELIBEXEC - - Cannot exec a shared library directly - - -.. data:: EILSEQ - - Illegal byte sequence - - -.. data:: ERESTART - - Interrupted system call should be restarted - - -.. data:: ESTRPIPE - - Streams pipe error - - -.. data:: EUSERS - - Too many users - - -.. data:: ENOTSOCK - - Socket operation on non-socket - - -.. data:: EDESTADDRREQ - - Destination address required - - -.. data:: EMSGSIZE - - Message too long - - -.. data:: EPROTOTYPE - - Protocol wrong type for socket - - -.. data:: ENOPROTOOPT - - Protocol not available - - -.. data:: EPROTONOSUPPORT - - Protocol not supported - - -.. data:: ESOCKTNOSUPPORT - - Socket type not supported - - -.. data:: EOPNOTSUPP - - Operation not supported on transport endpoint - - -.. data:: ENOTSUP - - Operation not supported - - .. versionadded:: 3.2 - - -.. data:: EPFNOSUPPORT - - Protocol family not supported - - -.. data:: EAFNOSUPPORT - - Address family not supported by protocol - - -.. data:: EADDRINUSE - - Address already in use - - -.. data:: EADDRNOTAVAIL - - Cannot assign requested address - - -.. data:: ENETDOWN - - Network is down - - -.. data:: ENETUNREACH - - Network is unreachable - - -.. data:: ENETRESET - - Network dropped connection because of reset - - -.. data:: ECONNABORTED - - Software caused connection abort. This error is mapped to the - exception :exc:`ConnectionAbortedError`. - - -.. data:: ECONNRESET - - Connection reset by peer. This error is mapped to the exception - :exc:`ConnectionResetError`. - - -.. data:: ENOBUFS - - No buffer space available - - -.. data:: EISCONN - - Transport endpoint is already connected - - -.. data:: ENOTCONN - - Transport endpoint is not connected - - -.. data:: ESHUTDOWN - - Cannot send after transport endpoint shutdown. This error is mapped - to the exception :exc:`BrokenPipeError`. - - -.. data:: ETOOMANYREFS - - Too many references: cannot splice - - -.. data:: ETIMEDOUT - - Connection timed out. This error is mapped to the exception - :exc:`TimeoutError`. - - -.. data:: ECONNREFUSED - - Connection refused. This error is mapped to the exception - :exc:`ConnectionRefusedError`. - - -.. data:: EHOSTDOWN - - Host is down - - -.. data:: EHOSTUNREACH - - No route to host - - -.. data:: EHWPOISON - - Memory page has hardware error. - - .. versionadded:: 3.14 - - -.. data:: EALREADY - - Operation already in progress. This error is mapped to the - exception :exc:`BlockingIOError`. - - -.. data:: EINPROGRESS - - Operation now in progress. This error is mapped to the exception - :exc:`BlockingIOError`. - - -.. data:: ESTALE - - Stale NFS file handle - - -.. data:: EUCLEAN - - Structure needs cleaning - - -.. data:: ENOTNAM - - Not a XENIX named type file - - -.. data:: ENAVAIL - - No XENIX semaphores available - - -.. data:: EISNAM - - Is a named type file - - -.. data:: EREMOTEIO - - Remote I/O error - - -.. data:: EDQUOT - - Quota exceeded - -.. data:: EQFULL - - Interface output queue is full - - .. versionadded:: 3.11 - -.. data:: ENOTCAPABLE - - Capabilities insufficient. This error is mapped to the exception - :exc:`PermissionError`. - - .. availability:: WASI, FreeBSD - - .. versionadded:: 3.11.1 - - -.. data:: ECANCELED - - Operation canceled - - .. versionadded:: 3.2 - - -.. data:: EOWNERDEAD - - Owner died - - .. versionadded:: 3.2 - - -.. data:: ENOTRECOVERABLE - - State not recoverable - - .. versionadded:: 3.2 +.. [#BlockingIOError] This error is mapped to the exception :exc:`BlockingIOError`. +.. [#BrokenPipeError] This error is mapped to the exception :exc:`BrokenPipeError`. +.. [#ChildProcessError] This error is mapped to the exception :exc:`ChildProcessError`. +.. [#ConnectionAbortedError] This error is mapped to the exception :exc:`ConnectionAbortedError`. +.. [#ConnectionRefusedError] This error is mapped to the exception :exc:`ConnectionRefusedError`. +.. [#ConnectionResetError] This error is mapped to the exception :exc:`ConnectionResetError`. +.. [#FileExistsError] This error is mapped to the exception :exc:`FileExistsError`. +.. [#FileNotFoundError] This error is mapped to the exception :exc:`FileNotFoundError`. +.. [#InterruptedError] This error is mapped to the exception :exc:`InterruptedError`. +.. [#IsADirectoryError] This error is mapped to the exception :exc:`IsADirectoryError`. +.. [#NotADirectoryError] This error is mapped to the exception :exc:`NotADirectoryError`. +.. [#PermissionError] This error is mapped to the exception :exc:`PermissionError`. +.. [#ProcessLookupError] This error is mapped to the exception :exc:`ProcessLookupError`. +.. [#TimeoutError] This error is mapped to the exception :exc:`TimeoutError`.