首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Zappa部署错误- troposphere==2.7.1没有帮助模板:‘AttributeError’对象没有属性'add_description‘

Zappa部署错误- troposphere==2.7.1没有帮助模板:‘AttributeError’对象没有属性'add_description‘
EN

Stack Overflow用户
提问于 2021-09-20 02:07:53
回答 2查看 1.6K关注 0票数 4

我已经将我的python项目从2.7迁移到了3.8。我正在尝试使用zappa进行部署。但是,一旦开始更新Lambda函数的配置,它就会遇到这个错误。

代码语言:javascript
复制
Updating Lambda function configuration..
Oh no! An error occurred! :(

==============

Traceback (most recent call last):
  File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 3422, in handle
    sys.exit(cli.handle())
  File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 588, in handle
    self.dispatch_command(self.command, stage)
  File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 644, in dispatch_command
    self.vargs["docker_image_uri"],
  File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 1194, in update
    endpoint_configuration=self.endpoint_configuration,
  File "/Users/leilakarimi/Projects/ATGWSams/venv/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'

我发现了这个问题,并试图按照这个post中的建议降级对流层,但我再次遇到了一个新的错误,如下:

代码语言:javascript
复制
   ERROR: Command errored out with exit status 1:
     command: /Users/leilakarimi/Projects/ATGWSams/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/setup.py'"'"'; __file__='"'"'/private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-pip-egg-info-hguo5f3y
         cwd: /private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/
    Complete output (1 lines):
    error in troposphere setup command: use_2to3 is invalid.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/35/a1/cfb1f6b2f271213da05fd5c67cda0256d7d841ba0edbfa815ae517c6235d/troposphere-2.2.0.tar.gz#sha256=b2e322063e2278e7d69822943d230b683ce9a0438db8ad017f610d344998453d (from https://pypi.org/simple/troposphere/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement troposphere==2.7.1 (from versions: 0.1.2, 0.2.0, 0.3.0, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 3.0.0, 3.0.1, 3.0.2, 3.0.3)
ERROR: No matching distribution found for troposphere==2.7.1

任何想法/帮助都是非常感谢的。谢谢

EN

回答 2

Stack Overflow用户

发布于 2021-09-26 18:29:33

setuptools 58破坏了对use_2to3的支持。因此,您应该将setuptools<58troposphere<3一起添加到需求文件中。如果你仍然遇到同样的问题,请先降级setuptools,然后再安装具有其他要求的对流层。

相关问题:Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)

票数 7
EN

Stack Overflow用户

发布于 2021-09-30 13:11:04

我们已经派生了zappa,并删除了Werkzeug的固定需求。Zappa项目已经重新启动,但是更新已经很晚了。您可以在这个blog上阅读如何做到这一点

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69248426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档