gpt4 book ai didi

python - 502 错误网关 : Registered endpoint failed to handle the request.:Python

转载 作者:太空宇宙 更新时间:2023-11-03 21:19:38 25 4
gpt4 key购买 nike

我正在尝试在 ibm 云上部署使用 python 和 Flask 开发的应用程序。该应用程序也被推送并启动,但是当我访问该链接时,我收到错误:

502 Bad Gateway: Registered endpoint failed to handle the request

我的 list 文件如下所示:

applications:
- name: people
memory: 256M
command: python main.py
random-route: true
services:
- eapenDB2

我的 procfile 如下所示:

web: people

推送应用程序后控制台的样子: CLI

这些是我的日志。我希望他们有帮助: Logs1 Logs2 Logs3 Logs4 Logs5很抱歉这篇文章很长。但真的希望你能帮助我。

最佳答案

如果我们将代码模块化到多个文件夹中,Python 需要在每个文件夹中包含 __init__.py。在我们的例子中,我们的根目录中有 run.py,其余代码位于“src”文件夹中的多个文件夹中。关于这一点的一篇好文章:

https://damyanon.net/post/flask-series-structure/

关于python - 502 错误网关 : Registered endpoint failed to handle the request.:Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54409487/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com