derek-thomas HF staff commited on
Commit
d3ddb39
1 Parent(s): 7405c46

Better error handling

Browse files
Files changed (1) hide show
  1. utilities.py +1 -1
utilities.py CHANGED
@@ -34,7 +34,7 @@ def create_time_series_features(revlog_start_date, timezone, next_day_starts_at,
34
  progress=gr.Progress(track_tqdm=True)):
35
  if os.path.isfile(proj_dir / "collection.anki21b"):
36
  os.remove(proj_dir / "collection.anki21b")
37
- raise Exception(
38
  "Please export the file with `support older Anki versions` if you use the latest version of Anki.")
39
  elif os.path.isfile(proj_dir / "collection.anki21"):
40
  con = sqlite3.connect(proj_dir / "collection.anki21")
 
34
  progress=gr.Progress(track_tqdm=True)):
35
  if os.path.isfile(proj_dir / "collection.anki21b"):
36
  os.remove(proj_dir / "collection.anki21b")
37
+ raise gr.Error(
38
  "Please export the file with `support older Anki versions` if you use the latest version of Anki.")
39
  elif os.path.isfile(proj_dir / "collection.anki21"):
40
  con = sqlite3.connect(proj_dir / "collection.anki21")