Alvinn-aai commited on
Commit
9a983a8
·
1 Parent(s): d59421c

handle err

Browse files
Files changed (1) hide show
  1. src/submission/submit.py +6 -1
src/submission/submit.py CHANGED
@@ -5,6 +5,7 @@ import requests
5
 
6
  import pandas as pd
7
  from datasets import Dataset, get_dataset_config_names
 
8
  from pandas.api.types import is_integer_dtype
9
  import gradio as gr
10
 
@@ -33,7 +34,11 @@ def add_new_solutions(
33
  ensure_all_present: bool = False,
34
  ):
35
  # Users must wait MIN_WAIT_TIME_PER_USER_HRS hours between submissions.
36
- submitted_ids = get_dataset_config_names(SUBMISSIONS_REPO, token=TOKEN)
 
 
 
 
37
  user_last_submission_date = None
38
  for sid in submitted_ids:
39
  # Extract stable ID (last part)
 
5
 
6
  import pandas as pd
7
  from datasets import Dataset, get_dataset_config_names
8
+ from datasets.exceptions import DatasetNotFoundError
9
  from pandas.api.types import is_integer_dtype
10
  import gradio as gr
11
 
 
34
  ensure_all_present: bool = False,
35
  ):
36
  # Users must wait MIN_WAIT_TIME_PER_USER_HRS hours between submissions.
37
+ try:
38
+ submitted_ids = get_dataset_config_names(SUBMISSIONS_REPO, token=TOKEN)
39
+ except (DatasetNotFoundError, FileNotFoundError):
40
+ submitted_ids = []
41
+
42
  user_last_submission_date = None
43
  for sid in submitted_ids:
44
  # Extract stable ID (last part)