peterknife / boto

Automatically exported from code.google.com/p/boto
0 stars 0 forks source link

boto.config inaccessible in Mac OS #580

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add the following code in your python script which imports boto,
   if not boto.config.has_section('Boto'):
        boto.config.add_section('Boto')
    boto.config.set('Boto', 'num_retries', '5')
    print boto.config.get('Boto', 'num_retries')
    print boto.__version__

The code is copied from the botoConfig wiki page.

2. Run script
3.

What is the expected output? What do you see instead?
5
2

I see a statement to the effect that 'config' is not recognized within 'boto'
    if not boto.config.has_section('Boto'):
AttributeError: 'module' object has no attribute 'config'

What version of the product are you using? On what operating system?
Not sure which version. I think it is v 2.0. I am running on Mac OS Snow 
Leopard.

Please provide any additional information below.
The same code runs on my PC fine. 
boto.__version__ prints 2
boto.config.get('Boto', 'num_retries') prints 5

Original issue reported on code.google.com by anant6...@gmail.com on 17 Jan 2012 at 11:32

GoogleCodeExporter commented 9 years ago
I did a 
print boto.__file__ on both the PC and the MAC.

PC
C:\Python27\lib\site-packages\boto\__init__.pyc

MAC
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bo
to/__init__.pyc

Original comment by anant6...@gmail.com on 17 Jan 2012 at 11:46

GoogleCodeExporter commented 9 years ago
Solved my own problem. Turns out I had boto 0.8 on my MAC. I upgraded to boto 
2.0b1 and it seems to be fine now!

Original comment by anant6...@gmail.com on 18 Jan 2012 at 12:16

GoogleCodeExporter commented 9 years ago
Wow, 0.8?  That's pretty old!  Glad you got it working.

Original comment by Mitch.Ga...@gmail.com on 19 Jan 2012 at 1:43