felixCheungcheung / mixing_secrets_v2

A NEW VERSION OF MIXING SECRETS DATASET FOR MUSIC SOURCE SEPARATION
17 stars 3 forks source link

All archives are not extracted #1

Open csteinmetz1 opened 1 year ago

csteinmetz1 commented 1 year ago

Hi Felix,

I found this issue when running unrar.py. I think this exit() command should not be called. It only extracts the first zip file and then exits.

https://github.com/felixCheungcheung/mixing_secrets_v2/blob/420c556b6d67b7a0fb4081197da435adf412f4ec/unrar.py#LL23C15-L23C23

csteinmetz1 commented 1 year ago

Related to this. I also hit an issue on some potentially corrupt .zip files.

Traceback (most recent call last):
  File "unrar.py", line 18, in <module>
    with ZipFile(file_path, 'r') as zip:
  File "/homes/cjs01/miniconda3/envs/ms21db/lib/python3.8/zipfile.py", line 1234, in __init__
    self._RealGetContents()
  File "/homes/cjs01/miniconda3/envs/ms21db/lib/python3.8/zipfile.py", line 1301, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Maybe we want a try except block to skip these?

felixCheungcheung commented 1 year ago

Thank you Christian! Fixed in https://github.com/felixCheungcheung/mixing_secrets_v2/commit/43db084ca7b0ce0fc729f371712ea50111339b4f