Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigParser.MissingSectionHeaderError: File contains no section headers #1

Closed
phildobbin opened this issue Apr 18, 2013 · 1 comment

Comments

@phildobbin
Copy link

I'm getting:

`:~/dev/botosh ] $ !!
python main.py
Traceback (most recent call last ):
File "main.py", line 3, in
import boto
File "/usr/lib/python2.7/dist-packages/boto/init.py", line 38, in
config = Config()
File "/usr/lib/python2.7/dist-packages/boto/pyami/config.py", line 69, in init
self.read(BotoConfigLocations)
File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, l
ConfigParser.MissingSectionHeaderError: File contains no section headers.'

when running `python main.py' I've attempted to pacify it by rearranging the Access Key & Secret Key but no joy.

This is on Ubuntu 12.04.2 with python-boto installed & run directly from the Git repo.

Any help appreciated (Python's not my strong suit)...

@lonetwin
Copy link
Owner

Hi @phildobbin

Thanks for taking the time to try botosh. Sorry about the rather sparse instructions for the install in the README. The instructions assume that you already have boto installed and configured. The issue is being caused because the format of the boto config file is incorrect. The boto config file is a regular .ini (windows type) file with name/values under a section. The section botosh most cares about is the [Credentials] section. So create a file like so (possibly as ~/.boto)

[Credentials]
aws_access_key_id = XXXXXXXXXX
aws_secret_access_key = XXXXXXXXXX 

Hope that help fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants