NotADirectoryError
am trying to load this dataset but face NotADirectory Error, huggingface/datasets/downloads/d8e030e5da5c6927b468fa2d5046b77101b0e2b8c180fca4aa7c7729e9767f9c/CORD/train/image'
same problem as above
@josephloh @eliascc5 Any resolutions?
@nielsr Could you please help us resolve this issue?
once I ran this " dataset = load_dataset("nielsr/cord-layoutlmv3") " , i get the same error " NotADirectoryError: [Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/d8e030e5da5c6927b468fa2d5046b77101b0e2b8c180fca4aa7c7729e9767f9c/CORD/train/image' "
and the dataset viewer is not working either
no solution is working .
please I need some guidance.
Hi, anyone found a solution to this?
@josephloh @eliascc5 @Sugam10 @missdua-07 @Kunjan
I had the same NotADirectoryError
error, and I've just found that this happens because when the cord-layoutlmv3.py
script is executed, namely the _split_generators
method, the files which are downloaded by the command downloaded_file = dl_manager.download_and_extract(_URLS)
, are not two .zip files with the actual data but two files with the following content:
Google Drive can't scan this file for viruses.
CORD-1k-001.zip (2.0G) is too large for Google to scan for viruses. Would you still like to download this file?Google Drive can't scan this file for viruses.
CORD-1k-002.zip (179M) is too large for Google to scan for viruses. Would you still like to download this file?
This happens because when the dl manager attempts to download the files, it sees these files warning about the virus scanning instead of the desired zip archives. So if you open them directly by following links:
Link 1: https://drive.usercontent.google.com/download?id=1MqhTbcj-AHXOqYoeoh12aRUwIprzTJYI
Link 2: https://drive.usercontent.google.com/download?id=1wYdp5nC9LnHQZ2FcmOoC0eClyWvcuARU
you will see the content I mentioned above in 1. and 2.
The workaround I’ve come up with is very similar to the approach to a similar problem reported here:
https://github.com/huggingface/datasets/issues/873#issuecomment-1046287806
- Log out of your google accounts in your browser. Otherwise it won’t work, and the dl_manager will download the virus scanning warnings.
- Locate your
cord-layoutlmv3.py
script. In my case, it is situated in the~/.cache/huggingface/modules/datasets_modules/datasets/nielsr--cord-layoutlmv3/581083d58bb5c35fdcfed4f7b36f9a8bf23acfd28e974edc7b8157c972720203
directory, after I have already unsuccessfully tried to download the dataset by running thedataset = load_dataset("nielsr/cord-layoutlmv3")
line. Now open thecord-layoutlmv3.py
script and change the_URLS
variable to the following:
_URLS = [
"https://drive.usercontent.google.com/download?id=1MqhTbcj-AHXOqYoeoh12aRUwIprzTJYI&confirm=t",
"https://drive.usercontent.google.com/download?id=1wYdp5nC9LnHQZ2FcmOoC0eClyWvcuARU&confirm=t"
]
- Load the dataset in your project as you initially did:
dataset = load_dataset("nielsr/cord-layoutlmv3")
Please let me know if it does the trick for you.