mwirth7 commited on
Commit
13cc4b4
·
verified ·
1 Parent(s): cba09e9

Update BirdSet.py

Browse files
Files changed (1) hide show
  1. BirdSet.py +3 -2
BirdSet.py CHANGED
@@ -82,8 +82,9 @@ def _extract_and_delete(dl_dir: dict) -> dict:
82
  #audio_path = dl_manager.extract(path) # if all archive files are without subfolders this works just fine
83
  audio_path = _extract_all_to_same_folder(path, output_dir)
84
  os.remove(path)
85
- os.remove(f"{path}.lock")
86
- os.remove(f"{path}.json")
 
87
  audio_paths[name].append(audio_path)
88
 
89
  return audio_paths
 
82
  #audio_path = dl_manager.extract(path) # if all archive files are without subfolders this works just fine
83
  audio_path = _extract_all_to_same_folder(path, output_dir)
84
  os.remove(path)
85
+ # datasets >3.0.0 hadels cach differently
86
+ os.remove(f"{path}.lock") if os.path.exists(f"{path}.lock") else None
87
+ os.remove(f"{path}.json") if os.path.exists(f"{path}.json") else None
88
  audio_paths[name].append(audio_path)
89
 
90
  return audio_paths