question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When calling zappa deploy dev AttributeError: 'Template' object has no attribute 'add_description'

See original GitHub issue

I’m trying to build and deploy a new Zappa app for the first time, and when I ran Zappa deploy I got the following error:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zappa/cli.py", line 3422, in handle
    sys.exit(cli.handle())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zappa/cli.py", line 588, in handle
    self.dispatch_command(self.command, stage)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zappa/cli.py", line 644, in dispatch_command
    self.vargs["docker_image_uri"],
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zappa/cli.py", line 1194, in update
    endpoint_configuration=self.endpoint_configuration,
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zappa/core.py", line 2417, in create_stack_template
    self.cf_template.add_description("Automatically generated with Zappa")
AttributeError: 'Template' object has no attribute 'add_description'

Context

I am running python 3.7.2 and am using a virtual environment. Zappa init ran just fine and I was able to generate a zappa_settings.json file.

Here is my pip freeze:

argcomplete==1.12.3
asgiref==3.4.1
boto3==1.18.6
botocore==1.21.6
certifi==2021.5.30
cfn-flip==1.2.3
charset-normalizer==2.0.3
click==8.0.1
Django==3.2.5
durationpy==0.5
future==0.18.2
hjson==3.0.2
idna==3.2
importlib-metadata==4.6.1
jmespath==0.10.0
kappa==0.6.0
pep517==0.11.0
pip-tools==6.2.0
placebo==0.9.0
python-dateutil==2.8.2
python-slugify==5.0.2
pytz==2021.1
PyYAML==5.4.1
requests==2.26.0
s3transfer==0.5.0
six==1.16.0
sqlparse==0.4.1
text-unidecode==1.3
toml==0.10.2
tomli==1.1.0
tqdm==4.61.2
troposphere==2.4.1
typing-extensions==3.10.0.0
urllib3==1.26.6
Werkzeug==0.16.1
wsgi-request-logger==0.4.6
zappa==0.53.0
zipp==3.5.0

Expected Behavior

Zappa should deploy correctly.

Actual Behavior

It looks like a lambda function is created for my Zappa project, but no API gateway is created, so it only gets so far in the deployment process before it fails, and the failure is the traceback as see above.

Your Environment

I am using OSX 11.2.3, and my zappa_settings.json file is:

{
    "dev": {
        "aws_region": "us-east-1",
        "django_settings": "scribox.settings",
        "profile_name": "default",
        "project_name": "django-lambda-i",
        "runtime": "python3.7",
        "s3_bucket": "MY_BUCKET"
    }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

5reactions
omar-enriquecommented, Jul 28, 2021

Not sure when the #999 pull request is going to be reviewed, merged, and released, but for now to get myself unblocked, I manually went into the installed Zappa package I had in my Python modules, and manually edited the line that’s breaking. The issue is that the troposphere 3.0.0 version replaces add_description with set_description, so I changed that function in line 2417 in zappa/core.py from add_description to set_description.

https://github.com/zappa/Zappa/blob/master/zappa/core.py#L2417

With that change my app is now deploying just fine.

3reactions
rafagancommented, Aug 30, 2021

Zappa is still under maintenance? How could a simply problem like that not be solved fast. Where’s the compatibility with flask 2?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zappa deploy fails with AttributeError: 'Template' object has no ...
In requirements.txt, I changed troposphere==3.0.3 to troposphere<3, ran zappa update dev but got the same error. Any other ideas?
Read more >
'Template' object has no attribute 'add_description' · Issue #1002
Continuously getting this error while deploying basic flask application to AWS. Any help would be much appreciated.
Read more >
Attributeerror: Module 'Jmespath' Has No Attribute 'Functions ...
When calling zappa deploy dev AttributeError: 'Template' object has no attribute 'adddescription' #1016.I'm trying to build and deploy a new Zappa app for....
Read more >
Lessons in Serverless Stacks Using NLP to Block Unsolicited ...
In that regard, “Zappa makes it super easy to build and deploy serverless, event-driven ... AttributeError: module 'api' has no attribute ...
Read more >
Deploy Landing Page en AWS con Flask y Zappa - LinkedIn
Vamos ahora a levantar la Landing Page, buscaremos algún template HTML5 ... with Zappa") AttributeError: 'Template' object has no attribute ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found