iQuentin commited on
Commit
dd5eac2
·
verified ·
1 Parent(s): d60a3ea

small bug correction

Browse files
Files changed (1) hide show
  1. simuGAIA.py +6 -3
simuGAIA.py CHANGED
@@ -254,9 +254,12 @@ def run_simuGAIA_all( profile: gr.OAuthProfile | None, submit: Optional[bool] =
254
  json_path = "already_answered.json"
255
  try:
256
  if os.path.exists(json_path):
257
- with open(json_path, "r", encoding="utf-8") as f:
258
- data = json.load(f)
259
- if not isinstance(data, list):
 
 
 
260
  data = []
261
  else:
262
  data = []
 
254
  json_path = "already_answered.json"
255
  try:
256
  if os.path.exists(json_path):
257
+ try:
258
+ with open(json_path, "r", encoding="utf-8") as f:
259
+ data = json.load(f)
260
+ if not isinstance(data, list):
261
+ data = []
262
+ except (json.JSONDecodeError, ValueError):
263
  data = []
264
  else:
265
  data = []