如何阻止 Python 在退出时崩溃
脚本运行后,Python 实例崩溃。
错误签名是:
AppName pythonw.exe AppVer 0.0.0.0 ModName:ntdll.dll
ModVer 5.2.3790.3959 Offset 00020d8e
脚本有时工作正常,然后崩溃。它是随 Spyder 一起推出的。 当在 Spyder 之外启动时,仍然崩溃。
第一次运行似乎有效,但第二次运行却崩溃了。
Python版本。 Python 2.6.6(r266:84297,2010 年 8 月 24 日,18:46:32)[MSC v.1500 32 位(英特尔)]
After a script runs, the Python instance crashes.
Error Signature is:
AppName pythonw.exe AppVer 0.0.0.0 ModName:ntdll.dll
ModVer 5.2.3790.3959 Offset 00020d8e
The script sometimes works fine, then other crashes. It launched from with Spyder.
When launched outside of Spyder, still crashes.
The first run seems to work, but the second gives crashes.
Python version.
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当发生这种情况时,您的第一步必须是停止使用 pythonw.exe 运行脚本。使用 python.exe 启动脚本,以便您获得一个控制台窗口,并且可以看到回溯消息。这通常会告诉您代码的哪一部分导致了崩溃。
您是否使用 Python 2.6 版本的二进制文件?
When this kind of thing happens, your first move has to be to STOP using pythonw.exe to run the script. Start the script with python.exe so that you get a console window and you can see the traceback message. That will usually tell you what part of the code is causing the crash.
Did you install Spyder using the Python 2.6 version of the binary?
这是 NT 内核层 DLL 中的错误,该 DLL 是 Windows 操作系统的一部分。最可能的原因是操作系统错误或硬件问题。您可能需要进入 Windows 更新并查看是否有针对您已安装的硬件的可选更新。
这与 Python 没有直接关系,您最好希望做的就是找出脚本的哪一部分触发了操作系统错误,并避免这样做。
This is an error in the NT Kernel Layer DLL which is part of the Windows OS. Most likely causes are an OS bug, or a hardware problem. You might want to go into Windows Update and see if there are any optional updates for hardware that you have installed.
This has nothing directly to do with Python and the best that you could hope to do would be to figure out what part of your script triggers the OS bug, and avoid doing that.