gpt4 book ai didi

python - flask .cli.NoAppException : Application crashing

转载 作者:太空狗 更新时间:2023-10-30 01:47:57 25 4
gpt4 key购买 nike

我的 Flask 应用程序在我尝试访问它时崩溃了。

这是类似于 this 的错误或 this .但是,我的设置似乎是正确的。

flask.cli.NoAppException: The file/path provided (server) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py

我的环境变量设置正确。

export FLASK_APP=server.py
export FLASK_DEBUG=1

我的服务器文件是server.py,目录下没有__init__.py

我不记得对代码进行过任何特殊更改。错误可能来自哪里?

最佳答案

问题是某些包丢失或损坏。

我用 pip3 install -r requirements.txt --ignore-installed 重新安装了所有东西,现在一切正常。

关于python - flask .cli.NoAppException : Application crashing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41979427/

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