Unable to download dataset

It is just downloading and the process is not finishing can you guys help me out and it is showing this error which i have attached in a second image and i have tried the user agent command to download the dataset what can i do this to solve this issue .

from six.moves import urllib
opener = urllib.request.build_opener()
opener.addheaders = [(‘User-agent’, ‘Mozilla/5.0’)]

Do you mind sharing the notebook link?
Recently it worked for me. Probably, you might need to reload the notebook and try again.

This is a known issue and should be resolved in the nightly torchvision release as explained here.

i have tried that thing and it his showing me different error this time it was showing 403 forbidden and this time 503 service unavailable as you can see in both the pictures the error is different.

here is the link.i have to admit that it is kinda working but it is not working on a full scale yet. I mean it is taking long time to download the dataset and i tried after sometime it is not happening can u tell th e proper way to do it

This should also be addressed by hosting the MNIST dataset directly in this PR.

can you show me or attach any refference i am not able to understand in that link

You can install the latest nightly binaries via e.g.:

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-nightly

and the download would work again using the other mirrors:

import torch
import torchvision
import torchvision.datasets as datasets


dataset = datasets.MNIST(root='./data', download=True)


Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz
Extracting ./data/MNIST/raw/train-images-idx3-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz to ./data/MNIST/raw/train-labels-idx1-ubyte.gz
Extracting ./data/MNIST/raw/train-labels-idx1-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz to ./data/MNIST/raw/t10k-images-idx3-ubyte.gz
Extracting ./data/MNIST/raw/t10k-images-idx3-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz to ./data/MNIST/raw/t10k-labels-idx1-ubyte.gz
Extracting ./data/MNIST/raw/t10k-labels-idx1-ubyte.gz to ./data/MNIST/raw

1 Like

what should be the command for google colab because im not working in conda

I think you could install the pip wheels via !pip install using the install command from here.

I am getting this error and if mention the cuda command then it is showing me this error

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch-nightly'

You are missing the conda and pip commands. To install the nightly pip wheels with CUDA10.2 use:

pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html

as described in the link.

I have tried it and it is working fine for the first day but the problem ccontinues on today can you have some alternate solution to try

Your current environment uses torchvision==0.9.0, so you would have to reinstall the nightly again.

i have reinstalled but it continuing the same error

Could you print the torchvision.__version__ after reinstalling the nightly binary as well as the error message you are seeing?