Skip to content

Commit

Permalink
Handle the errors properly
Browse files Browse the repository at this point in the history
  • Loading branch information
NPodlozhniy committed Jan 16, 2023
1 parent 076ca10 commit 72af675
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ def get_reality(wks_name, *kwargs) -> list:
for wks_name in wks_names(button):
try:
ref_dict[wks_name] = ref_dict[wks_name].result()
except Exception as e:
print(e, flush=True)
except RuntimeError: # if there is no tab
ref_dict.pop(wks_name)
except IndexError: # if there is no data
ref_dict.pop(wks_name)
finally:
fact_dict[wks_name] = fact_dict[wks_name].result()

Expand Down

0 comments on commit 72af675

Please sign in to comment.