关于错误An exception has occurred,use %tb to see the full traceback,SystemExit

来源:互联网 发布:全国大学生网络文化节 编辑:程序博客网 时间:2024/06/07 07:05

在用TensorFlow训练MNIST数据集时(用的是spyder IDE)
总是出现如下错误:

出现错误

百度了下,都没有找到什么好的办法,看到一个英文贴子,解释了这个问题,原帖子链接:
https://stackoverflow.com/questions/10888045/simple-ipython-example-raises-exception-on-sys-exit

这里写图片描述

原链接后面解答貌似是回答了这个错误:

 RuntimeError: A QApplication instance already exists.

对”use %tb to the full traceback”并没有很好的解决。

但是上面说了,这个错误只在用IPython时发生,用命令行的python时不会发生。于是打开命令行尝试:

这里写图片描述

确实如此,目前没找到具体什么原因,先不用图形界面了,用命令行窗口做吧。

阅读全文
0 0