diff --git a/src/plugins/repeat/recorder.py b/src/plugins/repeat/recorder.py index 49b1f501..7f8a6451 100644 --- a/src/plugins/repeat/recorder.py +++ b/src/plugins/repeat/recorder.py @@ -294,9 +294,9 @@ async def data_migration(): users[(date_str, group_id, user_id)] = { "msg_number": msg_number } - for (date, group_id, user_id), values in users.items(): + for (date_str, group_id, user_id), values in users.items(): record = Record( - date=datetime.strptime(date, "%Y-%m-%d").date(), + date=datetime.strptime(date_str, "%Y-%m-%d").date(), platform="qq", group_id=group_id, user_id=user_id, diff --git a/src/plugins/weather/heweather_api.py b/src/plugins/weather/heweather_api.py index 1e6d74f2..bab94b4f 100644 --- a/src/plugins/weather/heweather_api.py +++ b/src/plugins/weather/heweather_api.py @@ -104,6 +104,6 @@ async def heweather(location: str, adm: str | None = None) -> str | None: await daily(city[0]), ] ) - except: + except Exception: logger.exception("和风天气 API 请求失败") return