报错
“no available data for year {}, only year between [{}, {}] supported”.
NotImplementedError: no available data for year 2023, only year between [2004, 2022] supported
原因
由于次年的节假日安排,取决于国务院发布的日程。 所以chinesecalendar项目一般会在国务院更新以后,发布新的版本。 按照以往的经验,一般是每年的 11月 前后发布新版本。
解决方法
pip install -U chinesecalendar
或者
pip install chinesecalendar==1.8.0
1.8.0取当前chinesecalendar最新版本
附上chinesecalendar项目地址
chinesecalendar·PyPI