diff --git a/scheduler/scheduler_module.py b/scheduler/scheduler_module.py index 7912511..5cdb789 100644 --- a/scheduler/scheduler_module.py +++ b/scheduler/scheduler_module.py @@ -101,7 +101,7 @@ async def poll_external_api(): # data 参数用于表单字段,files 参数用于文件 for name in config_data["user_group"]: data = { - "message": "文档", + "message": "", "contactName": name } async with httpx.AsyncClient() as client: diff --git a/util/config.py b/util/config.py index de535b3..2c03b4a 100644 --- a/util/config.py +++ b/util/config.py @@ -16,7 +16,7 @@ class DataLoader: print(f"current fileop.py path: {file_path}") if DataLoader._data is None: try: - with open(file_path, "r") as file: + with open(file_path, "r", encoding='utf-8') as file: DataLoader._data = json.load(file) except FileNotFoundError: raise HTTPException(status_code=500, detail="File not found")