Datasets:

Modalities:
Text
Formats:
json
ArXiv:
Libraries:
Datasets
Dask
License:

Format issue when loading dataset

#1
by antoine314 - opened

Hello,

When trying to download and use the dataset with load_dataset('monology/pile-uncopyrighted') I get the following issue:

File "path_to_env/lib/python3.10/site-packages/datasets/packaged_modules/js
on/json.py", line 144, in _generate_tables                                                        
    dataset = json.load(f)                                                                        
  File "path_to_env/lib/python3.10/json/__init__.py", line 293, in load      
    return loads(fp.read(),                                                                       
  File "path_to_env/lib/python3.10/json/__init__.py", line 346, in loads     
    return _default_decoder.decode(s)                                                             
  File "path_to_env/lib/python3.10/json/decoder.py", line 340, in decode     
    raise JSONDecodeError("Extra data", s, end)                                                   
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 173)                              
                                                                                                  
During handling of the above exception, another exception occurred:                               
                                                                                                  
Traceback (most recent call last):                                                                
  File "path_to_env/lib/python3.10/site-packages/datasets/builder.py", line 1
925, in _prepare_split_single                                                                     
    for _, table in generator:                                                                    
  File "path_to_env/lib/python3.10/site-packages/datasets/packaged_modules/js
on/json.py", line 147, in _generate_tables                                                        
    raise e                                                                                       
  File "path_to_env/lib/python3.10/site-packages/datasets/packaged_modules/js
on/json.py", line 121, in _generate_tables                                                        
    pa_table = paj.read_json(                                                                     
  File "pyarrow/_json.pyx", line 290, in pyarrow._json.read_json                                  
  File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status                
  File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status                                 
pyarrow.lib.ArrowInvalid: JSON parse error: Incorrect hex digit after \u escape in string. in row 
1984

Does anyone know why this could happen? Should I load the dataset differently?

Thank you

I think it is caused by incomplete dataset files. Check their integrities after downloading.

Sign up or log in to comment