Everything was working well for months and now i am suddenly getting this error everytime i try to load my dataset. " from datasets import load_dataset
dataset = load_dataset(“sebascorreia/sc09”, split=“test”)
"/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py in init(self, **kwargs)
636 if security is not None:
637 security = BlobSecurityInfo(
→ 638 safe=security[“safe”], av_scan=security[“avScan”], pickle_import_scan=security[“pickleImportScan”]
639 )
640 self.security = security
KeyError: ‘safe’
" My dataset is just a replica of the SC09 dataset used by the WaveGAN paper. I dont i changed anything about it, i tried upgrading the datasets and the hugginface hub libraries, I tried loading other datasets and i still get the same error. Am i the one considered unsafe or something? I really need this fixed, i am finishing up my evaluation for my dissertation, this is the last thing i needed right now. If anyone knows what is going on please help!
I think there is some issue with the blob/data HF is sending over which is leading to this issues.
The error comes from: site-packages/huggingface_hub/hf_api.py
L638 safe=security[“safe”], av_scan=security[“avScan”], pickle_import_scan=security[“pickleImportScan”]
security data is a nested dict
security
{‘hf’: {‘blobId’: ‘d8bdd5db36bc882309fab2fddecea23622de8fe9’, ‘name’: ‘README.md’, ‘safe’: True, ‘indexed’: False, ‘avScan’: {‘virusFound’: False, ‘virusNames’: None}, ‘pickleImportScan’: None}}
Due to the nested nature, security[‘safe’] is not directly accessible. I did a quick fix by setting, security = security[‘hf’], and the code works. This is just a quick fix, but the right solution should be coming from HF.