部署Flask应用程序时出现dateutil语法错误

问题描述 投票:0回答:1

我正在尝试使用Heroku部署一个烧瓶应用程序(https://github.com/ihavemadefire/BestYearYet)。当我部署它时,它会立即崩溃。我无法判断重定向是否告诉我代码中存在错误(它在本地浏览器端口上运行完美),虚拟环境中的错误或外部库中是否有错误。

我已经尝试更新appdirs和flask-dateutil库。我尝试从Heroku git cli和Github部署。我检查了我的代码,看看我是否遗漏了某些东西(但就像我说的,它在本地运行良好)我甚至尝试重启。我认为这个问题超出了我的经验水平。

以下是来自Heroku的相关错误日志(大大截断):

文件“/app/.heroku/python/lib/python3.6/site-packages/alembic/script/base.py”,第7行,来自dateutil import tz文件“/app/.heroku/python/lib/python3 .6 / site-packages / dateutil / tz.py“,第78行self._name,^

python heroku flask deployment
1个回答
0
投票

看起来alembic依赖于python-dateutil。在你的Requirements.txt中确保在dateutil条目之后出现alembic并尝试再次将应用程序推送到heroku。

© www.soinside.com 2019 - 2024. All rights reserved.