AttributeError: 'module' object has no attribute 'detect'
2017-06-14 14:25
579 查看
python源文件与关键字重名了。
1. 命名py脚本时,不要与python预留字,模块名等相同
2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件;在已经生成.pyc文件的情况下,若代码不更新,运行时依旧会走pyc,所以要删除.pyc文件),重新运行代码;或者找一个可以运行代码的环境,拷贝替换当前机器的.pyc文件即可
1. 命名py脚本时,不要与python预留字,模块名等相同
2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件;在已经生成.pyc文件的情况下,若代码不更新,运行时依旧会走pyc,所以要删除.pyc文件),重新运行代码;或者找一个可以运行代码的环境,拷贝替换当前机器的.pyc文件即可
相关文章推荐
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 的解决方法
- 使用旧版本tensorflow出现了negative等报错的问题,AttributeError: 'module' object has no attribute 'xxx'"
- AttributeError: 'module' object has no attribute 'reader'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: ‘module’ object has no attribute’xxx 问题解决
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'classmethod' object has no attribute '__module__'
- AttributeError: 'module' object has no attribute '_base' 可行解决办法
- AttributeError: 'module' object has no attribute 'text_format'
- web.py 启动时候出现AttributeError: 'module' object has no attribute 'inet_pton'错误
- AttributeError: 'module' object has no attribute '_base' 可行解决办法
- AttributeError: 'module' object has no attribute(转)
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'LabelMap'
- Keras深度学习框架学习笔记(3) - AttributeError:’module’ object has no attribute ‘ifelse’错误信息的解决方法
- AttributeError: ‘module’ object has no attribute ‘load_dotenv
- AttributeError: 'module' object has no attribute 'AF_INET'
- AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'