简体   繁体   English

使用PyDev Eclipse插件时“Python已停止工作”

[英]“Python has stopped working” when using PyDev Eclipse plugin

When working with the Python plugin PyDev for Eclipse on Windows 7, I sometimes get following popup error message: 在Windows 7上使用Python插件PyDev for Eclipse时,我有时会收到以下弹出错误消息:

在此输入图像描述

Python funktioniert nicht mehr
Ein Problem hat die richtige Ausführung dieses Programms verhindert. Schließen Sie das Programm.

I am able to close that window and to continue to work with PyDev. 我能够关闭该窗口并继续使用PyDev。 However, those error messages are annoying and I would like to understand/fix the issue. 但是,这些错误消息很烦人,我想了解/解决问题。

There are some general hints on how to disable window error reporting: 有一些关于如何禁用窗口错误报告的一般提示:

Suppress message: "python.exe has stopped working" 抑制消息:“python.exe已停止工作”

Python has stopped working Python已停止工作

I don't want to completely disable error reporting on windows. 我不想完全禁用Windows上的错误报告。

=> Is there some PyDev or Eclipse setting that I could use to address this issue? =>我可以使用一些PyDev或Eclipse设置来解决这个问题吗?

The usual reason this happens is because PyDev obtains code-completion information by creating a python shell and communicating with it so that it imports a module and does some dir calls in it or its classes to get information (and then, sometimes a module is misbehaving so that the mere fact of importing it or getting its contents makes that python shell crash). 发生这种情况的通常原因是因为PyDev通过创建python shell并与之通信来获取代码完成信息,以便它导入模块并在其中或其类中执行一些dir调用以获取信息(然后,有时模块行为不端因此,仅导入它或获取其内容的事实会导致python shell崩溃)。

Usually the error log contains information on which module was being loaded when that happens (see: http://www.pydev.org/faq.html#HowdoIReportaBUG for how to access the error log) so that you can track it down. 通常,错误日志包含有关何时发生加载的模块的信息(请参阅: http//www.pydev.org/faq.html#HowdoIReportaBUG以了解如何访问错误日志),以便您可以对其进行跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM