2014-11-25 41 views
2

我试图用这个文件我的Django应用程序部署到AWS:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html“ValueError异常:值过多解压”,同时部署Django应用程序到AWS

一切顺利uptil最后一步:混帐aws.push

它返回以下错误:

DCs-MacBook-Pro:ssite deeptichopra$ git aws.push 
Traceback (most recent call last): 
    File ".git/AWSDevTools/aws.elasticbeanstalk.push", line 41, in <module> 
    dev_tools = DevTools() 
    File "/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/dev_tools.py", line 36, in __init__ 
    self.beanstalk_config = ElasticBeanstalkConfig(os.getcwd()) 
    File "/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/elastic_beanstalk_config.py", line 70, in __init__ 
    self.set_credential_settings() 
    File "/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/elastic_beanstalk_config.py", line 108, in set_credential_settings 
    self.credential_settings = self.credential_file["global"] 
    File "/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/ini.py", line 59, in __getitem__ 
    return section.to_h() 
    File "/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/ini.py", line 39, in to_h 
    (key, value) = line.split("=") 
ValueError: too many values to unpack 

中的mysite/.ebextensions的mysite.config文件:

container_commands: 
    01_syncdb:  
    command: “manage.py syncdb --noinput" 
    leader_only: true 

option_settings: 
    - namespace: aws:elasticbeanstalk:container:python 
    option_name: WSGIPath 
    value: ssite/wsgi.py 
    - option_name: DJANGO_SETTINGS_MODULE 
    value: ssite.settings 

在.elasticbeanstalk文件夹中的配置文件:

[global] 
ApplicationName=ssite 
AwsCredentialFile=/Users/deeptichopra/.elasticbeanstalk/aws_credential_file 
DevToolsEndpoint=git.elasticbeanstalk.ap-southeast-1.amazonaws.com 
EnvironmentName=ssite-env 
EnvironmentTier=WebServer::Standard::1.0 
EnvironmentType=SingleInstance 
InstanceProfileName=aws-elasticbeanstalk-ec2-role 
OptionSettingFile=/Users/deeptichopra/Desktop/ssite/.elasticbeanstalk/optionsettings.ssite-env 
RdsDeletionPolicy=Snapshot 
RdsEnabled=Yes 
RdsSourceSnapshotName= 
Region=ap-southeast-1 
ServiceEndpoint=https://elasticbeanstalk.ap-southeast-1.amazonaws.com 
SolutionStack=64bit Amazon Linux 2014.09 v1.0.9 running Python 2.7 

该应用程序运行在本地服务器上的罚款。什么可能是错的?

+0

回溯告诉你,行中有多个'='。尝试打印行看看它的内容是什么。 – Alasdair 2014-11-25 12:43:26

+0

但它指向的行来自aws代码。我没有编辑任何东西,只是下载它。 – dvc 2014-11-25 16:41:44

回答

-2

似乎您的Elastic Beanstalk配置文件有问题。您可以发布文件.elasticbeanstalk/config的内容吗?

.elasticbeanstalk隐藏目录应该存在于你的git工作副本的根目录中。

+0

我认为这应该更好地发布为评论。因为这不是一个答案 – 2014-11-25 14:44:59

+0

我认为这个问题是与配置文件,这是一个anwser恕我直言,虽然是部分。为了加强我的回答,我要求揭幕战发布文件,以便我可以扩展并完成我的答案。 – baxeico 2014-11-25 14:47:51

+0

您的意思是mysite/.ebextensions中的mysite.config文件?我在问题中补充说。 – dvc 2014-11-25 16:09:29

0

检查您的~/.elasticbeanstalk/aws_credential_file文件。不要在这里发布内容。

是否有任何值/密码的=?那是你的问题。

亚马逊提供的python脚本分割=上的行,但他们不会告诉你任何你不能在密码中使用=的地方。

+1

谢谢!我不可能猜到这一点! – dvc 2014-12-13 13:41:53

相关问题