@ -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:
@ -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")