bentrevett / pytorch-seq2seq

Tutorials on implementing a few sequence-to-sequence (seq2seq) models with PyTorch and TorchText.
MIT License
5.36k stars 1.33k forks source link

[Errno 2] No such file or directory: '.data\\multi30k\\train.de' #67

Closed s1530129650 closed 4 years ago

s1530129650 commented 4 years ago

When running the code train_data, valid_data, test_data = Multi30k.splits(exts = ('.de', '.en'), fields = (SRC, TRG),), It will occur an error [Errno 2] No such file or directory: '.data\multi30k\train.de'

s1530129650 commented 4 years ago

adding root = 'data' is ok. train_data, valid_data, test_data = Multi30k.splits(exts = ('.de', '.en'), fields = (SRC, TRG),root = 'data')

bentrevett commented 4 years ago

Not sure why that fixed your problem. TorchText should automatically download the data to the .data. folder (default root argument) if it can't find it.

thak123 commented 4 years ago

adding root = 'data' is ok. train_data, valid_data, test_data = Multi30k.splits(exts = ('.de', '.en'), fields = (SRC, TRG),root = 'data')

what is your operating system

s1530129650 commented 4 years ago

My operating system is Window10 which I mentioned in the question

s1530129650 commented 4 years ago

Not sure why that fixed your problem. TorchText should automatically download the data to the .

Me too, I clicked the function, found this arg and set root = 'data'. Then it worked. If you knew more, please share it with me.

LIZHICHAOUNICORN commented 4 years ago

Not sure why that fixed your problem. TorchText should automatically download the data to the .

Me too, I clicked the function, found this arg and set root = 'data'. Then it worked. If you knew more, please share it with me.

arunsechergy commented 3 years ago

Not sure why that fixed your problem. TorchText should automatically download the data to the .data. folder (default root argument) if it can't find it.

When we run the Multi30k.splits function with let's say 'de' language first time, TorchText automatically downloads the data to the .data folder. When we execute the same function second time with different language let's say 'fr', TorchText tries to find the fr inside the .data folder which was created in the first execution. It will not be there, so no 'fr' found error. If we mention, root='data', it will download if it did not find the file

amitkayal commented 3 years ago

This issue seems to be still existing. I tried today and stuck with same issue. I am running in colab

manu-chauhan commented 3 years ago

This issue seems to be still existing. I tried today and stuck with same issue. I am running in colab

Initially it was not running, had to instal torchtext==0.8.0 (running on Colab). But now 'fr' train data is not available... any ideas??

FileNotFoundError: No such file or directory: 'data/multi30k/train.fr'

CharlesJu1 commented 3 years ago

I found out that if multi30k folder exists under .data folder and nothing is in multi30k, the error will show up. This could happen if the download failed after the folder multi30k is created. You can delete multi30k folder will run again and it will download again.

yuvaraj91 commented 3 years ago

@CharlesJu1 could you please let me know where is the .data folder located? Or how I can find it please? I am using MacOS

LAWRENCE-COPER commented 2 years ago

you should delete the empty mutil30k folder and try to change your network(use a proxy , vpn or something) cause the main reason for this issue is because your network can't get to those datasets and it just create an empty folder which trigger this error (which it really shouldn't be because it is abusolutly unrelated to the real problem).

oh, and the old muti30k datasets is different from the new one, you shouldn't get confused.