Mon*_*ael 8 python eclipse logging pydev nonetype
我正在编写一个脚本,它使用日志记录模块来处理脚本的详细程度.我正在使用Eclipse的PyDev插件并运行Python 3.2.如果我"运行"脚本一切正常,但如果我"调试"脚本,我会收到以下错误:
Traceback (most recent call last):
File "C:\Program Files (x86)\Eclipse\eclipse\plugins\org.python.pydev_3.2.0.201312292215\pysrc\pydevd.py", line 1146, in trace_dispatch
filename, base = GetFilenameAndBase(frame)
File "C:\Program Files (x86)\Eclipse\eclipse\plugins\org.python.pydev_3.2.0.201312292215\pysrc\pydevd_file_utils.py", line 224, in GetFilenameAndBase
return NORM_FILENAME_AND_BASE_CONTAINER[f]
TypeError: 'NoneType' object is not subscriptable
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚错误来自哪里,所以我开始评论所有内容并找出"导入日志记录"语句导致错误.这是我正在运行的代码:
import logging
def main():
print("Logging import test")
if __name__ == '__main__':
main()
Run Code Online (Sandbox Code Playgroud)
我已经检查过以确保日志记录模块与我的Python32安装位置中的所有其他标准模块一起使用.有任何想法吗?同样,这只是在我以调试模式运行PyDev时; 运行完成,没有错误.谢谢!
归档时间: |
|
查看次数: |
1079 次 |
最近记录: |