我使用命令行或者ipython都不会报错,唯独使用pycharm的话就会报如下错误:
/usr/bin/python3.3 /home/eailfly/PycharmProjects/upyun/upyun.py
Traceback (most recent call last):
File "/home/eailfly/PycharmProjects/upyun/upyun.py", line 5, in <module>
import upyun
File "/home/eailfly/PycharmProjects/upyun/upyun.py", line 8, in <module>
up = upyun.UpYun('demobucket', 'demouser', 'demopass', timeout=30, endpoint=upyun.ED_AUTO)
AttributeError: 'module' object has no attribute 'UpYun'
Process finished with exit code 1
确定装过upyun包了。
确实是文件名的问题,不能用和包名重复