Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django YAML例外。无效Yaml_Django_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

Django YAML例外。无效Yaml

Django YAML例外。无效Yaml,django,amazon-web-services,amazon-elastic-beanstalk,Django,Amazon Web Services,Amazon Elastic Beanstalk,我正试图在AWS elasticbeanstalk中上传我的Django rest框架应用程序。我从这里沿着台阶走 我完全按照上面提到的做了,结果在创建环境时出错了 WARNING: You have uncommitted changes. Creating application version archive "app-989c-171129_120334". Uploading TestApi/app-989c-171129_120334.zip to S3. This may take

我正试图在AWS elasticbeanstalk中上传我的Django rest框架应用程序。我从这里沿着台阶走

我完全按照上面提到的做了,结果在创建环境时出错了

WARNING: You have uncommitted changes.
Creating application version archive "app-989c-171129_120334".
Uploading TestApi/app-989c-171129_120334.zip to S3. This may take a while.
Upload Complete.
ERROR: InvalidParameterValueError - The configuration file .ebextensions/packag
s.config in application version app-989c-171129_120334 contains invalid YAML or
JSON. YAML exception: Invalid Yaml: while scanning for the next token
found character         '\t' that cannot start any token
 in "<reader>", line 6, column 1:

    ^
, JSON exception: Invalid JSON: Unexpected character (p) at position 0.. Update
the configuration file.
我哪里做错了

更新:-

 option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: ebdjango/wsgi.py
(env) C:\Users\india\Desktop\tutorial\env>eb init -p python2.7 TestApi

Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
13) us-east-2 : US East (Ohio)
14) ca-central-1 : Canada (Central)
15) eu-west-2 : EU (London)
(default is 3):
Application TestApi has been created.

(env) C:\Users\india\Desktop\tutorial\env>eb init
Note: Elastic Beanstalk now supports AWS CodeCommit; a fully-managed source cont
rol service. To learn more, see Docs: https://aws.amazon.com/codecommit/
Do you wish to continue with CodeCommit? (y/N) (default is n): y

Select a repository
1) codecommit-origin
2) [ Create new Repository ]
(default is 1):
(env) C:\Users\india\Desktop\tutorial\env>eb create djang0-api-env
WARNING: You have uncommitted changes.
Creating application version archive "app-989c-171129_111635".
Uploading TestApi/app-989c-171129_111635.zip to S3. This may take a while.
Upload Complete.
Environment details for: djang0-api-env
  Application name: TestApi
  Region: us-west-2
  Deployed Version: app-989c-171129_111635
  Environment ID: e-89wz2qwskj
  Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 2.7 running on 6
4bit Amazon Linux/2.6.0
  Tier: WebServer-Standard
  CNAME: UNKNOWN
  Updated: 2017-11-29 05:46:52.690000+00:00
Printing Status:
INFO: createEnvironment is starting.
INFO: Using elasticbeanstalk-us-west-2-957209152698 as Amazon S3 storage bucket
for environment data.
ERROR: The configuration file .ebextensions/packages.config in application versi
on app-989c-171129_111635 contains invalid YAML or JSON. YAML exception: Invalid
 Yaml: while scanning for the next token
found character         '\t' that cannot start any token
 in "<reader>", line 6, column 1:

    ^
, JSON exception: Invalid JSON: Unexpected character (p) at position 0.. Update
the configuration file.
ERROR: Failed to launch environment.

ERROR: ServiceError - Failed to launch environment.
(env)C:\Users\india\Desktop\tutorial\env>eb init-p python2.7 TestApi
选择默认区域
1) 美国东部1:美国东部(北弗吉尼亚州)
2) 美国西部-1:美国西部(北加利福尼亚州)
3) 美国西部-2:美国西部(俄勒冈州)
4) eu-west-1:欧盟(爱尔兰)
5) eu-central-1:欧盟(法兰克福)
6) ap-south-1:亚太地区(孟买)
7) 亚太地区(新加坡)
8) 亚太地区(悉尼)
9) 亚太地区(东京)
10) 亚太地区(首尔)
11) sa-east-1:南美洲(圣保罗)
12) cn-north-1:中国(北京)
13) 美国东部-2:美国东部(俄亥俄州)
14) ca-central-1:加拿大(中部)
15) eu-west-2:欧盟(伦敦)
(默认值为3):
已创建应用程序TestApi。
(env)C:\Users\india\Desktop\tutorial\env>eb init
注意:Elastic Beanstalk现在支持AWS CodeCommit;完全管理的源代码控制
rol服务。要了解更多信息,请参阅文档:https://aws.amazon.com/codecommit/
是否要继续使用CodeCommit?(y/N)(默认为N):y
选择一个存储库
1) 编解码源
2) [创建新存储库]
(默认值为1):
(env)C:\Users\india\Desktop\tutorial\env>eb create djang0 api env
警告:您有未提交的更改。
正在创建应用程序版本存档“app-989c-171129_111635”。
正在将TestApi/app-989c-171129_111635.zip上载到S3。这可能需要一段时间。
上传完成。
djang0 api环境的环境详细信息
应用名称:TestApi
地区:美国西部-2
部署版本:app-989c-171129_111635
环境ID:e-89wz2qwskj
平台:arn:aws:elasticbeanstalk:us-west-2::Platform/Python 2.7在6.0上运行
4位Amazon Linux/2.6.0
层:Web服务器标准
CNAME:未知
更新:2017-11-29 05:46:52.690000+00:00
打印状态:
信息:createEnvironment正在启动。
信息:使用elasticbeanstalk-us-west-2-957209152698作为Amazon S3存储桶
环境数据。
错误:应用程序版本中的配置文件.ebextensions/packages.config
app-989c-171129_111635上包含无效的YAML或JSON。YAML异常:无效
Yaml:扫描下一个令牌时
找到无法启动任何令牌的字符'\t'
在“”第6行第1列中:
^
,JSON异常:无效JSON:位置0处的意外字符(p)。。更新
配置文件。
错误:无法启动环境。
错误:ServiceError-无法启动环境。

使用像@ChackoMathew这样的YAML验证器,它是有效的并且必须是有效的。这与aws Doc中的相同。如果你用它复制了任何制表符/空格,你能分享你问题中的整个片段吗?@jarnohenneman我很确定我没有复制任何制表符/空格。我已经更新了命令流。错误是在第6行,第一个字符是一个制表符,它应该是空格。使用像@ChackoMathew这样的YAML验证器它是有效的,并且必须是有效的。这与aws Doc中的相同。如果你用它复制了任何制表符/空格,你能分享你问题中的整个片段吗?@jarnohenneman我很确定我没有复制任何制表符/空格。我已经更新了命令流。错误是在第6行,第一个字符是一个制表符,它只应该是空格。