lundi 14 avril 2014

les services web Amazon - Boto.conf introuvable - Stack Overflow


I am running a flask app on an AWS EC2 server, and have been using boto to access data stored in dynamoDB. After accidentally adding boto.conf to a git commit (and push and pull on the server), I have found that my python code can no longer locate the boto.conf file. I rolled back the changes with git, but the problem remains.


The python module and boto.conf file exist in the same directory, but when the module calls


boto.config.load_credential_file('boto.conf')

I get the flask error IOError: [Errno 2] No such file or directory: 'boto.conf'.




As per Documentation:


I'm not really sure why you are using boto.config_load_credential_file. In general you can pick up the config in a file called either ~/.boto or /etc/boto.cfg.


You can also look at this questions from SO that also answers how to get the configuration for boto: Getting Credentials File in the boto.cfg for Python



I am running a flask app on an AWS EC2 server, and have been using boto to access data stored in dynamoDB. After accidentally adding boto.conf to a git commit (and push and pull on the server), I have found that my python code can no longer locate the boto.conf file. I rolled back the changes with git, but the problem remains.


The python module and boto.conf file exist in the same directory, but when the module calls


boto.config.load_credential_file('boto.conf')

I get the flask error IOError: [Errno 2] No such file or directory: 'boto.conf'.



As per Documentation:


I'm not really sure why you are using boto.config_load_credential_file. In general you can pick up the config in a file called either ~/.boto or /etc/boto.cfg.


You can also look at this questions from SO that also answers how to get the configuration for boto: Getting Credentials File in the boto.cfg for Python


0 commentaires:

Enregistrer un commentaire