Skip to content

常见报错

TypeError: Only timezones from the pytz library are supported

Django项目中,使用django_apscheduler之后,启动报这个错:

1832669303237771264.png

原因可能是由于tzlocal的版本太高导致的,当使用pip list查看到,当前出错的tzlocal版本是 3.0,选择降低版本:

bash
pip install tzlocal==2.1

然后就好了。

参考:https://blog.csdn.net/liujingqiu/article/details/119968816 6>