我試圖訪問使用AWS寶途,並且它不工作連接到S3。我已經安裝了Boto,並在/ etc中安裝了boto.cfg。這裏是我的代碼:使用boto與Python的
import requests, json
import datetime
import hashlib
import boto
conn = boto.connect_s3()
這裏的錯誤:
Traceback (most recent call last):
File "boto.py", line 4, in <module>
import boto
File "/home/mydir/public_html/boto.py", line 6, in <module>
conn = boto.connect_s3()
AttributeError: 'module' object has no attribute 'connect_s3'
什麼是地獄?這並不複雜。
不知道我的錯誤是相關的,但我發現博託/ utils的。py「,第171行,在merge_meta中 如果k.lower()在boto.s3.key.Key.base_user_settable_fields中: AttributeError:'module'對象沒有屬性'key' – radtek