【发布时间】:2016-10-08 00:54:50
【问题描述】:
拔掉我的头发!我正在尝试将 Python FLask 应用程序部署到 AWS Elastic Beanstalk,但出现错误
目标 WSGI 脚本 '/opt/python/current/app/application.py' 不包含 WSGI 应用程序 'application'
网页只是返回 500 服务器错误
我的application.py的内容如下:
#!/usr/bin/env python3
import connexion
if __name__ == '__main__':
application = connexion.App(__name__, specification_dir='./swagger/')
application.add_api('swagger.yaml', arguments={'title': 'This is a basic API fascade to theprotptype development robot. The API front-ends the communication with an MQTT pub/sub topic, which uses the Amazon Web Services IoT service.'})
application.run()
在本地运行良好,但当我上传到 AWS 时就不行了。我已将名称从 app.py 更改为 application.py 并将 app = 更改为 application = 但没有更改
不知道下一步该去哪里:(
【问题讨论】:
标签: python amazon-web-services flask amazon-elastic-beanstalk