PythonPython错误代码
SystemError
SystemError
这是什么问题?
代码 SystemError · Python 报告的问题。
译文说明
当解释器发现内部错误,但情况看起来没有严重到使其放弃所有希望时引发。关联值是一个字符串,指示出了什么问题(用低级术语来说)。在 CPython 中,错误地使用 Python 的 C API 可能会引发此问题,例如在没有设置异常的情况下返回 NULL 值。
如果您确信此异常不是您的错,也不是您正在使用的包的错,您应该将此报告给 Python 解释器的作者或维护者。请务必报告 Python 解释器的版本(sys.version;它也会在交互式 Python 会话开始时打印)、确切的错误消息(异常的关联值)以及触发错误的程序源(如果可能)。
Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。
官方说明 · 原文
Raised when the interpreter finds an internal error, but the situation does not look so serious to cause it to abandon all hope. The associated value is a string indicating what went wrong (in low-level terms). In CPython, this could be raised by incorrectly using Python’s C API, such as returning a NULL value without an exception set.
If you’re confident that this exception wasn’t your fault, or the fault of a package you’re using, you should report this to the author or maintainer of your Python interpreter. Be sure to report the version of the Python interpreter (sys.version; it is also printed at the start of an interactive Python session), the exact error message (the exception’s associated value) and if possible the source of the program that triggered the error.
故障排除与诊断链接
请先确认文档中的产品、版本及发生环境与当前情况一致。
- 代码参考
异常与警告的官方说明 ↗
定义与说明 · 非故障排除步骤
- 通用诊断指南
解读异常回溯与处理异常 ↗
适用于整个产品 · 非该代码专用
来源与使用条款
Built-in Exceptions — Python 3.15.2 documentation ↗
作者:Python Software Foundation
许可证:Python Software Foundation License Version 2
核查日期:2026-11-12
修改记录:English prose extracted; whitespace normalized; Korean context and classified official links added. Python code examples not redistributed. 译文说明已标注为自动翻译。