Python &引用;ValueError:太多的值无法解包;将Django应用程序部署到AWS时

Python &引用;ValueError:太多的值无法解包;将Django应用程序部署到AWS时,python,django,git,amazon-web-services,amazon-elastic-beanstalk,Python,Django,Git,Amazon Web Services,Amazon Elastic Beanstalk,我正试图使用以下文档将Django应用程序部署到AWS: 一切正常运行到最后一步:git 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 = DevTool

我正试图使用以下文档将Django应用程序部署到AWS:

一切正常运行到最后一步:git 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
.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

该应用程序在本地服务器上运行良好。可能有什么问题?

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


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

您的elasticbeanstalk配置文件似乎有问题。你能发布文件的内容吗?。elasticbeanstalk/config


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

检查
~/.elasticbeanstalk/aws\u凭证\u文件。不要在这里张贴内容

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


Amazon提供的python脚本将
=
上的行拆分,但它们不会告诉您任何地方不能在密码中使用
=

检查您的
~/.elasticbeanstalk/aws\u凭证\u文件
文件。不要在这里张贴内容

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


Amazon提供的python脚本将
=
上的行拆分,但它们不会告诉您任何地方不能在密码中使用
=

回溯告诉您行中有多个
=
。试着打印行,看看它的内容是什么。但它指向的行来自aws代码。我没有在那里编辑任何内容,只是下载了它。回溯告诉您,行中有多个
=
。试着打印行,看看它的内容是什么。但它指向的行来自aws代码。我没有在那里编辑任何东西,只是下载了它。我认为这应该作为评论发布。因为这不是一个答案,我认为问题在于配置文件,这是一个anwser IMHO,尽管是局部的。为了增强我的回答,我让开场白发布这个文件,这样我就可以展开并完成我的回答。你是说mysite/.ebextensions中的mysite.config文件?我在问题中添加了这一点。你应该在mysite文件夹中有一个名为.elasticbeanstalk的目录,不是吗?该文件看起来不错,你可以尝试调试代码,在/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/ini.py文件的第39行添加行
打印行。你应该看到你的配置的行被打印出来了,错误之前有问题的行被打印出来了。我认为这应该作为一个注释发布。因为这不是一个答案,我认为问题在于配置文件,这是一个anwser IMHO,尽管是局部的。为了增强我的回答,我让开场白发布这个文件,这样我就可以展开并完成我的回答。你是说mysite/.ebextensions中的mysite.config文件?我在问题中添加了这一点。你应该在mysite文件夹中有一个名为.elasticbeanstalk的目录,不是吗?该文件看起来不错,你可以尝试调试代码,在/Users/deeptichopra/Desktop/ssite/.git/AWSDevTools/aws/ini.py文件的第39行添加行
打印行。您应该会看到您的配置打印的行,以及错误之前打印的有问题的行。谢谢!我不可能猜到!非常感谢。我不可能猜到!
[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