原文:python 脚本运行时报错: AttributeError: 'module' object has no attribute ***

最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错 AttributeError: module object has no attribute xxx 。这其实是.pyc文件存在问题。 问题定位: 查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件 问题解决方法: . 命名py脚本时,不要与python预留字,模块名 ...

2018-01-19 11:33 0 2320 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM