Mit Boto zu verbinden, S3 mit Python

Ich versuche, den Zugriff auf AWS mithilfe von Boto, und es funktioniert nicht. Ich habe installiert Boto, und der boto.cfg in /etc. Hier ist mein code:

import requests, json
import datetime
import hashlib
import boto

conn = boto.connect_s3()

Hier der Fehler:

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'

Was zur Hölle? Dies ist nicht kompliziert.

  • Nicht sicher, ob mein Fehler ist, aber ich bin immer boto/utils.py", line 171, in merge_meta, wenn k.lower() in boto.s3.Schlüssel.Schlüssel.base_user_settable_fields: AttributeError: 'module' Objekt hat kein Attribut 'Schlüssel'
Schreibe einen Kommentar