Cmag
Cmag

Reputation: 15770

Boto and Python on AWS

I am trying to get boto to work, but I am getting an error.

Installed boto via easy_install, or simply python ./setup.py install

cat boto.py
#!/usr/bin/python
import boto
conn = boto.connect_ec2()

3c075474c10b% ./boto.py 
Traceback (most recent call last):
  File "./boto.py", line 2, in <module>
    import boto
  File "/Users/vasiliyb/scripts/boto.py", line 3, in <module>
    conn = boto.connect_ec2()
AttributeError: 'module' object has no attribute 'connect_ec2'

Upvotes: 2

Views: 1029

Answers (1)

garnaat
garnaat

Reputation: 45906

Just change the name of your module from "boto.py" to "myboto.py" (or whatever you like) and it will magically work.

You are basically redefining "boto" by naming your module boto.py.

Upvotes: 9

Related Questions