Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: not files with extension .gz #9

Open
lanlanlan3 opened this issue Apr 10, 2023 · 4 comments
Open

ERROR: not files with extension .gz #9

lanlanlan3 opened this issue Apr 10, 2023 · 4 comments

Comments

@lanlanlan3
Copy link

dali_data = dali_code.get_the_DALI_dataset(dali_data_path, skip=[], keep=[])

@greeshmasmenon
Copy link

This used to work before. Now, I am also getting a similar error when i try to read a .gz file.

For example:

import DALI as dali_code
dali_code.get_info("data/DALI_v1.0/info/DALI_DATA_INFO.gz")

The above results in the following error :

Traceback (most recent call last):
  File "..../venv/lib/python3.10/site-packages/DALI/utilities.py", line 110, in read_gzip
    output = pickle.load(f)
_pickle.UnpicklingError: invalid load key, ','.

Can someone help with the above?

@gabolsgabs
Copy link
Owner

Hello,
Sorry for the late reply. I cannot reproduce the error:

import DALI as dali_code
dali_code.get_info(os.path.abspath("my_path_to_dali/DALI_v1.0/info/DALI_DATA_INFO.gz"))

array([['DALI_ID', 'NAME', 'YOUTUBE', 'WORKING'],
       ['e186227bb7474fa5a7738c9108f11972', 'Staind-Tangled_Up_In_You',
        'NXG-ayocugI', 'True'],
       ['520f583def024997adcab0567fb25a5d',
        'Boyzone-Baby_Can_I_Hold_You', 'ZjSLNZ9MsMI', 'True'],

have you downloaded the dataset at zenodo?

@greeshmasmenon
Copy link

Yes, I downloaded the data from Zenodo. I tried the same thing again and getting the error -

/tmp/ipykernel_156/2346031491.py in get_information(self)
     92         logging.info(f"Getting the info related to the data from the data_path = {self._info_path}")
     93         if self._info_path is not None:
---> 94             dali_info = dali_code.get_info(self._info_path)
     95             dali_df = pd.DataFrame(dali_info)[1:]
     96             dali_df.columns = dali_info[0]

~/.conda/envs/default/lib/python3.9/site-packages/DALI/main.py in get_info(dali_info_file)
     87     """Read the DALI INFO file with ['DALI_ID', 'YOUTUBE_ID', 'WORKING']
     88     """
---> 89     return ut.read_gzip(dali_info_file, print_error=True)
     90 
     91 

~/.conda/envs/default/lib/python3.9/site-packages/DALI/utilities.py in read_gzip(fl, print_error)
    111         except Exception as e:
    112             with gzip.open(fl, 'r') as f:
--> 113                 output = pickle.load(f)
    114     return output
    115 

UnpicklingError: invalid load key, ','.

Can you give me access once again through zenodo so that i can download a new copy of v1.0 ?

@ashanhr
Copy link

ashanhr commented Nov 7, 2023

Hello, Sorry for the late reply. I cannot reproduce the error:

import DALI as dali_code
dali_code.get_info(os.path.abspath("my_path_to_dali/DALI_v1.0/info/DALI_DATA_INFO.gz"))

array([['DALI_ID', 'NAME', 'YOUTUBE', 'WORKING'],
       ['e186227bb7474fa5a7738c9108f11972', 'Staind-Tangled_Up_In_You',
        'NXG-ayocugI', 'True'],
       ['520f583def024997adcab0567fb25a5d',
        'Boyzone-Baby_Can_I_Hold_You', 'ZjSLNZ9MsMI', 'True'],

have you downloaded the dataset at zenodo?

Hello,

I've found that this functions correctly with version 1. However, the error occurs when attempting to load data from version 2. I downloaded both versions from Zenodo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants