errno — 标准 errno 系统符号¶
This module makes available standard errno system symbols. The value of each
symbol is the corresponding integer value. The names and descriptions are
borrowed from linux/include/errno.h, which should be
all-inclusive.
- errno.errorcode¶
- 提供从 errno 值到底层系统中字符串名称的映射的字典。例如, - errno.errorcode[errno.EPERM]映射为- 'EPERM'。
如果要将数字的错误代码转换为错误信息,请使用 os.strerror()。
在下面的列表中,当前平台上没有使用的符号没有被本模块定义。 已定义的符号的具体列表可参见 errno.errorcode.keys()。 可用的符号包括:
- errno.EPERM¶
- Operation not permitted. This error is mapped to the exception - PermissionError.
- errno.ENOENT¶
- No such file or directory. This error is mapped to the exception - FileNotFoundError.
- errno.ESRCH¶
- No such process. This error is mapped to the exception - ProcessLookupError.
- errno.EINTR¶
- Interrupted system call. This error is mapped to the exception - InterruptedError.
- errno.EIO¶
- I/O 错误 
- errno.ENXIO¶
- 无此设备或地址 
- errno.E2BIG¶
- 参数列表过长 
- errno.ENOEXEC¶
- 执行格式错误 
- errno.EBADF¶
- 错误的文件号 
- errno.ECHILD¶
- No child processes. This error is mapped to the exception - ChildProcessError.
- errno.EAGAIN¶
- Try again. This error is mapped to the exception - BlockingIOError.
- errno.ENOMEM¶
- 内存不足 
- errno.EACCES¶
- Permission denied. This error is mapped to the exception - PermissionError.
- errno.EFAULT¶
- 错误的地址 
- errno.ENOTBLK¶
- 需要块设备 
- errno.EBUSY¶
- 设备或资源忙 
- errno.EEXIST¶
- File exists. This error is mapped to the exception - FileExistsError.
- errno.EXDEV¶
- 跨设备链接 
- errno.ENODEV¶
- 无此设备 
- errno.ENOTDIR¶
- Not a directory. This error is mapped to the exception - NotADirectoryError.
- errno.EISDIR¶
- Is a directory. This error is mapped to the exception - IsADirectoryError.
- errno.EINVAL¶
- 无效的参数 
- errno.ENFILE¶
- 文件表溢出 
- errno.EMFILE¶
- 打开的文件过多 
- errno.ENOTTY¶
- 不是打字机 
- errno.ETXTBSY¶
- 文本文件忙 
- errno.EFBIG¶
- 文件过大 
- errno.ENOSPC¶
- 设备已无可用空间 
- errno.ESPIPE¶
- 非法查找 
- errno.EROFS¶
- 只读文件系统 
- errno.EMLINK¶
- 链接过多 
- errno.EPIPE¶
- Broken pipe. This error is mapped to the exception - BrokenPipeError.
- errno.EDOM¶
- 数学参数超出函数范围 
- errno.ERANGE¶
- 数学运算结果无法表示 
- errno.EDEADLK¶
- 将发生资源死锁 
- errno.ENAMETOOLONG¶
- 文件名过长 
- errno.ENOLCK¶
- 没有可用的记录锁 
- errno.ENOSYS¶
- 功能未实现 
- errno.ENOTEMPTY¶
- 目录非空 
- errno.ELOOP¶
- 遇到过多的符号链接 
- errno.EWOULDBLOCK¶
- Operation would block. This error is mapped to the exception - BlockingIOError.
- errno.ENOMSG¶
- 没有所需类型的消息 
- errno.EIDRM¶
- 标识符被移除 
- errno.ECHRNG¶
- 信道编号超出范围 
- errno.EL2NSYNC¶
- 级别 2 未同步 
- errno.EL3HLT¶
- 级别 3 已停止 
- errno.EL3RST¶
- 级别 3 重置 
- errno.ELNRNG¶
- 链接编号超出范围 
- errno.EUNATCH¶
- 未附加协议驱动 
- errno.ENOCSI¶
- 没有可用的 CSI 结构 
- errno.EL2HLT¶
- 级别 2 已停止 
- errno.EBADE¶
- 无效的交换 
- errno.EBADR¶
- 无效的请求描述符 
- errno.EXFULL¶
- 交换已满 
- errno.ENOANO¶
- 没有阳极 
- errno.EBADRQC¶
- 无效的请求码· 
- errno.EBADSLT¶
- 无效的槽位 
- errno.EDEADLOCK¶
- 文件锁定死锁错误 
- errno.EBFONT¶
- 错误的字体文件格式 
- errno.ENOSTR¶
- 设备不是流 
- errno.ENODATA¶
- 没有可用的数据 
- errno.ETIME¶
- 计时器已到期 
- errno.ENOSR¶
- 流资源不足 
- errno.ENONET¶
- 机器不在网络上 
- errno.ENOPKG¶
- 包未安装 
- errno.EREMOTE¶
- 对象是远程的 
- errno.ENOLINK¶
- 链接已被切断 
- errno.EADV¶
- 广告错误 
- errno.ESRMNT¶
- 挂载错误 
- errno.ECOMM¶
- 发送时通讯错误 
- errno.EPROTO¶
- 协议错误 
- errno.EMULTIHOP¶
- 已尝试多跳 
- errno.EDOTDOT¶
- RFS 专属错误 
- errno.EBADMSG¶
- 非数据消息 
- errno.EOVERFLOW¶
- 值相对于已定义数据类型过大 
- errno.ENOTUNIQ¶
- 名称在网络上不唯一 
- errno.EBADFD¶
- 文件描述符处于错误状态 
- errno.EREMCHG¶
- 远端地址已改变 
- errno.ELIBACC¶
- 无法访问所需的共享库 
- errno.ELIBBAD¶
- 访问已损坏的共享库 
- errno.ELIBSCN¶
- a.out 中的 .lib 部分已损坏 
- errno.ELIBMAX¶
- 尝试链接过多的共享库 
- errno.ELIBEXEC¶
- 无法直接执行共享库 
- errno.EILSEQ¶
- 非法字节序列 
- errno.ERESTART¶
- 已中断系统调用需要重启 
- errno.ESTRPIPE¶
- 流管道错误 
- errno.EUSERS¶
- 用户过多 
- errno.ENOTSOCK¶
- 在非套接字上执行套接字操作 
- errno.EDESTADDRREQ¶
- 需要目标地址 
- errno.EMSGSIZE¶
- 消息过长 
- errno.EPROTOTYPE¶
- 套接字的协议类型错误 
- errno.ENOPROTOOPT¶
- 协议不可用 
- errno.EPROTONOSUPPORT¶
- 协议不受支持 
- errno.ESOCKTNOSUPPORT¶
- 套接字类型不受支持 
- errno.EOPNOTSUPP¶
- 操作在传输端点上不受支持 
- errno.EPFNOSUPPORT¶
- 协议族不受支持 
- errno.EAFNOSUPPORT¶
- 地址族不受协议支持 
- errno.EADDRINUSE¶
- 地址已被使用 
- errno.EADDRNOTAVAIL¶
- 无法分配要求的地址 
- errno.ENETDOWN¶
- 网络已断开 
- errno.ENETUNREACH¶
- 网络不可达 
- errno.ENETRESET¶
- 网络因重置而断开连接 
- errno.ECONNABORTED¶
- Software caused connection abort. This error is mapped to the exception - ConnectionAbortedError.
- errno.ECONNRESET¶
- Connection reset by peer. This error is mapped to the exception - ConnectionResetError.
- errno.ENOBUFS¶
- 没有可用的缓冲区空间 
- errno.EISCONN¶
- 传输端点已连接 
- errno.ENOTCONN¶
- 传输端点未连接 
- errno.ESHUTDOWN¶
- Cannot send after transport endpoint shutdown. This error is mapped to the exception - BrokenPipeError.
- errno.ETOOMANYREFS¶
- 引用过多:无法拼接 
- errno.ETIMEDOUT¶
- Connection timed out. This error is mapped to the exception - TimeoutError.
- errno.ECONNREFUSED¶
- Connection refused. This error is mapped to the exception - ConnectionRefusedError.
- errno.EHOSTDOWN¶
- 主机已关闭 
- errno.EHOSTUNREACH¶
- 没有到主机的路由 
- errno.EALREADY¶
- Operation already in progress. This error is mapped to the exception - BlockingIOError.
- errno.EINPROGRESS¶
- Operation now in progress. This error is mapped to the exception - BlockingIOError.
- errno.ESTALE¶
- 过期的 NFS 文件句柄 
- errno.EUCLEAN¶
- 结构需要清理 
- errno.ENOTNAM¶
- 不是 XENIX 命名类型文件 
- errno.ENAVAIL¶
- 没有可用的 XENIX 信标 
- errno.EISNAM¶
- 是命名类型文件 
- errno.EREMOTEIO¶
- 远程 I/O 错误 
- errno.EDQUOT¶
- 超出配额 
- errno.EQFULL¶
- Interface output queue is full - 3.11 新版功能. 
- errno.ENOTCAPABLE¶
- Capabilities insufficient. This error is mapped to the exception - PermissionError.- Availability: WASI, FreeBSD - 3.11.1 新版功能.