Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'
like image 429
Cmag Avatar asked Jan 30 '26 07:01

Cmag


1 Answers

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.

like image 80
garnaat Avatar answered Feb 01 '26 23:02

garnaat