Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eb deploy ERROR: TypeError - cannot concatenate 'str' and 'NoneType' objects

Sorry I don't see this question anywhere. I've deployed an environment for my application "scones" on AWS. It's fairly simple Node.js express app. Honestly it's just to test the elastic beanstalk deployment. Anyhoo I'm using ebcli and I've already done an "eb create scones1" and it does create the environment and launches it. But when I make some changes (not committed to git) and type 'eb deploy' on the command line I receive ERROR: TypeError - cannot concatenate 'str' and 'NoneType' objects every time. Even if I enter the environment name. Doesn't matter. What is happening? None of the documentation seems to mention any error like this. Is there an issue with my Python version? I

like image 474
anthony galligani Avatar asked Nov 16 '18 19:11

anthony galligani


3 Answers

I was having this same issue and determined it to be coming from the following line in ebcli/operations/deployops.py:

io.log_info('Deploying code to ' + env_name + " in region " + region_name)

I resolved it by explicitly specifying a region with -r REGION when executing the deploy. I imagine somewhere the default region should be configured so this does not happen.

Edit: I was able to permanently set the region with eb init --region us-east-1

like image 66
cody Avatar answered Sep 24 '22 00:09

cody


Solve with a simple eb init, put my credentials, and just works.

like image 39
Anubz Avatar answered Sep 27 '22 00:09

Anubz


Try git add . to stage your commits. Then, eb deploy --staged. You can check out the --staged flag here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-deploy.html

like image 30
Joaquin Roca Avatar answered Sep 25 '22 00:09

Joaquin Roca