【问题标题】:Error while eb create - argument of type 'NoneType' is not iterableeb create 时出错 - “NoneType”类型的参数不可迭代
【发布时间】:2020-12-14 21:43:20
【问题描述】:

这是我第一次通过 AWS 部署 Web 应用程序。

我按照本教程进行操作 - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html

使用 -> eb create 创建新环境时,出现此错误。

错误:TypeError - 'NoneType' 类型的参数不可迭代

谁能帮我看看是什么问题

这是我到目前为止所做的:

PS E:\projects\portfolio> & e:/projects/portfolio/eb-virt/Scripts/Activate.ps1
(eb-virt) PS E:\projects\portfolio> pip freeze > requirements.txt
(eb-virt) PS E:\projects\portfolio> mkdir .ebextensions


    Directory: E:\projects\portfolio
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        8/26/2020  10:26 AM                .ebextensions


(eb-virt) PS E:\projects\portfolio> deactivate

PS E:\projects\portfolio> eb init -p python-3.6 django-tutorial
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): A*****************Q
(aws-secret-key): V*****************************i
Application django-tutorial has been created.
PS E:\projects\portfolio> eb init
Do you wish to continue with CodeCommit? (Y/n): y

Enter Repository Name
(default is "portfolio"): portfolio
Successfully created repository: portfolio

Enter Branch Name
***** Must have at least one commit to create a new branch with CodeCommit *****
(default is "master"): portfolio_branch1
Successfully created branch: portfolio_branch1
Do you want to set up SSH for your instances?
(Y/n): y

Type a keypair name.
(Default is aws-eb): aws-eb-portfolio
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): ********
Enter same passphrase again: ********
Your identification has been saved in C:\Users\DELL\.ssh\aws-eb-portfolio.
Your public key has been saved in C:\Users\DELL\.ssh\aws-eb-portfolio.pub.
The key fingerprint is:
SHA256:ct2ec8pOsyR3smYuY2fyF6QSv7WjOhcz4HmSB4+5pgU aws-eb-portfolio
The keys randomart image is:
*
*
*
*
*

WARNING: Uploaded SSH public key for "aws-eb-portfolio" into EC2 for region us-west-2.
PS E:\projects\portfolio> eb create django-env
Starting environment deployment via CodeCommit


    ERROR: TypeError - argument of type 'NoneType' is not iterable

    PS E:\projects\portfolio> eb create
    Enter Environment Name
    (default is django-tutorial-dev): django-env
    Enter DNS CNAME prefix
    (default is django-env222222):  
    
    Select a load balancer type
    1) classic
    2) application
    (default is 2): 1
    
    Would you like to enable Spot Fleet requests for this environment? (y/N): n
    Starting environment deployment via CodeCommit
    

 - ERROR: TypeError - argument of type 'NoneType' is not iterable

    PS E:\projects\portfolio> eb create django-env
    Starting environment deployment via CodeCommit
    

 - ERROR: TypeError - argument of type 'NoneType' is not iterable


    PS E:\projects\portfolio>




    

【问题讨论】:

标签: django amazon-ec2 deployment amazon-elastic-beanstalk


【解决方案1】:

所以这就是我接下来所做的,它奏效了。我把代码源改成本地了。

PS E:\projects\portfolio> eb create django-tutorial  
'Starting environment deployment via CodeCommit
ERROR: TypeError - argument of type NoneType is not iterable'
PS E:\projects\portfolio> eb codesource
Current CodeCommit setup:
  Repository: portfolio
  Branch: portfolio_branch1
Select your codesource
1) CodeCommit
2) Local
(default is 2): 2

**Default set to use local sources**
PS E:\projects\portfolio> eb create django-tutorial
Creating application version archive "********".
Uploading django-tutorial/app-97e4-200826_140424.zip to S3. This may take a while.
Upload Complete.
Environment details for: django-tutorial
  Application name: django-tutorial
  Region: us-west-2
  Deployed Version: app-97e4-200826_140424
  Environment ID:
  Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 3.6 running on 64bit Amazon Linux/2.9.13
  Tier: WebServer-Standard-1.0
  CNAME: UNKNOWN
  Updated: 2020-08-26 08:19:42.277000+00:00
Printing Status:
2020-08-26 08:19:40    INFO    createEnvironment is starting.
2020-08-26 08:19:42    INFO    Using elasticbeanstalk-us-west-2-***********8 as Amazon S3 storage bucket for environment data.
2020-08-26 08:20:08    INFO    Created target group named: arn:aws:elasticloadbalancing:us-west-2:145081323719:targetgroup/awseb-AWSEB-**************
2020-08-26 08:20:08    INFO    Created security group named:
 -- Events -- (safe to Ctrl+C)

我的源代码来自本地存储库,而不是代码提交,这就是问题所在。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-07
    • 2011-10-04
    • 2016-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-15
    • 2012-04-26
    相关资源
    最近更新 更多