出现此错误的原因:是此文件smtp02.py 所在的目录下有string.pyc 的文件存在,与python库里的string.pyc冲突造成无法确认编译所取的类库。
相关文章
- httplib:AttributeError: 'module' object has no attribute 'HTTPConnection'
- 启动Tensorboard时发生错误:class BeholderHook(tf.estimator.SessionRunHook): AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'SessionRunHook'
- python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?
- Python报错module 'scipy.misc' has no attribute 'xxx'
- [已解决]pycharm报错:AttributeError: module 'pip' has no attribute 'main'
- python文件名不要跟模块名相同,报错AttributeError: 'module' object has no attribute 'Differ'
- 使用jieba导入引用方法时,报错AttributeError: module 'jieba' has no attribute 'cut'
- cv2.SIFT() AttributeError: 'module' object has no attribute 'SIFT' OpenCV Python can't use SURF, SIFT
- pytorch版本问题:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
- py+selenium 明明定位不到元素,但却不报错或是报错AttributeError: 'list' object has no attribute 'click'【已解决】