HibiKier / zhenxun_bot

基于 Nonebot2 开发,非常可爱的绪山真寻bot
GNU Affero General Public License v3.0
3.32k stars 604 forks source link

发生签到会报错 #1544

Closed yake1145141 closed 1 month ago

yake1145141 commented 1 month ago

系统版本:Ubuntu 20.04

真寻版本:0.1.5.3

错误截图

QQ20240802-011535

日志截图

QQ20240802-011535

错误说明

Traceback (most recent call last): File "/root/zhenxun_bot-main/bot.py", line 21, in nonebot.run() File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/init.py", line 273, in run get_driver().run(*args, **kwargs) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 172, in run uvicorn.run( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/uvicorn/main.py", line 578, in run server.run() File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/uvicorn/server.py", line 61, in run return asyncio.run(self.serve(sockets=sockets)) File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 142, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/message.py", line 188, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 727, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run await handler( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 108, in call return await cast(Callable[..., Awaitable[R]], self.call)(values) File "/root/zhenxun_bot-main/plugins/signin/init.py", line 117, in await group_user_check_in(nickname, event.user_id, event.group_id), File "/root/zhenxun_bot-main/plugins/sign_in/group_user_checkin.py", line 31, in group_user_check_in user, is_create = await SignGroupUser.get_or_create( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/models.py", line 1059, in get_or_create await cls.select_for_update().filter(kwargs).using_db(connection).get(), File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/queryset.py", line 1008, in _execute instance_list = await self._db.executor_class( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/backends/base/executor.py", line 139, in execute_select instance: "Model" = self.model._init_from_db( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/models.py", line 742, in _init_from_db setattr(self, model_field, field.to_python_value(kwargs[key])) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/fields/data.py", line 365, in to_python_value value = timezone.make_aware(value, get_timezone()) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/tortoise/timezone.py", line 97, in make_aware return tz.localize(value, is_dst=is_dst) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-8W611JwV-py3.9/lib/python3.9/site-packages/pytz/tzinfo.py", line 323, in localize loc_dt = dt + delta OverflowError: date value out of range

yake1145141 commented 1 month ago

windows server 2016安装也会出现这个问题

HibiKier commented 1 month ago

是新安装的项目吗,如果是的话,可以试试dev里的最新版本