AttributeError: 'module' object has no attribute 'reader'
2017-05-23 15:12
2011 查看
import csv reader = csv.reader(filename) #出错显示: AttributeError: 'module' object has no attribute 'reader'
# 出现这种错误的原因是:这个脚本所在的目录下有一个名叫csv.py脚本,正是因为这个csv.py的脚本导致了csv.reader()出错。解决方法是将csv.py重命名。
# 其实类似这种问题,都是因为这本目录下有脚本名与包名重名,所以造成“‘module’object has no attribute ...”
相关文章推荐
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'LabelMap'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'text_format'
- web.py 启动时候出现AttributeError: 'module' object has no attribute 'inet_pton'错误
- 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(转)
- python “AttributeError: '_csv.reader' object has no attribute'next'” 报错的解决办法
- AttributeError: 'module' object has no attribute 'randint'
- AttributeError: 'module' object has no attribute 'histogram_summary'
- AttributeError: 'module' object has no attribute 'text_format'
- [置顶] AttributeError: 'module' object has no attribute '_base' 可行解决办法
- 解决问题 AttributeError: 'module' object has no attribute 'face_recognition_model_v1'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 'showinfo'(已解决)
- Keras深度学习框架学习笔记(3) - AttributeError:’module’ object has no attribute ‘ifelse’错误信息的解决方法
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'