FD900 commited on
Commit
47b1528
·
verified ·
1 Parent(s): a6de347

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -51,12 +51,12 @@ def run_and_submit_all():
51
  success = True
52
 
53
  except Exception as e:
54
- print(f"[WARN] Attempt {attempt} failed: {e}")
55
- if attempt == MAX_RETRIES:
56
- answers.append({
57
- "task_id": task_id,
58
- "submitted_answer": f"ERROR: {str(e)}"
59
- })
60
 
61
  with open("partial_answers.json", "w", encoding="utf-8") as f:
62
  json.dump(answers, f, indent=2)
 
51
  success = True
52
 
53
  except Exception as e:
54
+ print(f"[ERROR] Task {task_id} failed after {attempt} attempts")
55
+ traceback.print_exc() # Shows full stack trace
56
+ answers.append({
57
+ "task_id": task_id,
58
+ "submitted_answer": f"ERROR: {str(e)}"
59
+ })
60
 
61
  with open("partial_answers.json", "w", encoding="utf-8") as f:
62
  json.dump(answers, f, indent=2)