Ignore missing JSON files with `FileNotFoundError` except

#7
by parkervg - opened
Files changed (1) hide show
  1. hybrid_qa.py +1 -1
hybrid_qa.py CHANGED
@@ -144,7 +144,7 @@ class HybridQa(datasets.GeneratorBasedBuilder):
144
  table = json.load(f)
145
  with open(url_data_path, encoding="utf-8") as f:
146
  url_data = json.load(f)
147
- except KeyError: # Some JSON files were not properly added to the GitHub repo: filenames with ':', '"'
148
  continue
149
 
150
  table["header"] = [header[0] for header in table["header"]]
 
144
  table = json.load(f)
145
  with open(url_data_path, encoding="utf-8") as f:
146
  url_data = json.load(f)
147
+ except FileNotFoundError: # Some JSON files were not properly added to the GitHub repo: filenames with ':', '"'
148
  continue
149
 
150
  table["header"] = [header[0] for header in table["header"]]