traceback.print_exc()python问题 [英] traceback.print_exc() python question

查看:649
本文介绍了traceback.print_exc()python问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



traceback.print_exc()


我在IDLE中使用以下代码行打印出我的追溯:

由于某些原因,我收到红色文本错误消息,但后面是蓝色文本无。



不知道什么没有关于任何想法?

解决方案

print_exc()不返回任何东西,在Python中实际返回。看起来IDLE正在向您显示它返回。


I am using the following line of code in IDLE to print out my traceback in an eception:

traceback.print_exc()

For some reason I get the red text error message, but then it is followed by a blue text of "None".

Not sure what that None is about, any ideas?

解决方案

print_exc() doesn't return anything, which in Python is actually returning None. Looks like IDLE is showing you the None it returned.

这篇关于traceback.print_exc()python问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆