|
|
|
@ -16,7 +16,7 @@ class DataLoader:
|
|
|
|
print(f"current fileop.py path: {file_path}")
|
|
|
|
print(f"current fileop.py path: {file_path}")
|
|
|
|
if DataLoader._data is None:
|
|
|
|
if DataLoader._data is None:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
with open(file_path, "r") as file:
|
|
|
|
with open(file_path, "r", encoding='utf-8') as file:
|
|
|
|
DataLoader._data = json.load(file)
|
|
|
|
DataLoader._data = json.load(file)
|
|
|
|
except FileNotFoundError:
|
|
|
|
except FileNotFoundError:
|
|
|
|
raise HTTPException(status_code=500, detail="File not found")
|
|
|
|
raise HTTPException(status_code=500, detail="File not found")
|
|
|
|
|