CIFAR10 Datasets Unavailable

Joel_Joseph_Kinny: <p>I am trying to download the CIFAR10 dataset using the module torchvision.datasets.CIFAR10 and the HTTP request fails with an error that the host is not accepting connections.</p>
<pre><code class="lang-auto">Traceback (most recent call last):
  File "D:\Program Files\Python310\lib\urllib\request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "D:\Program Files\Python310\lib\http\client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "D:\Program Files\Python310\lib\http\client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "D:\Program Files\Python310\lib\http\client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "D:\Program Files\Python310\lib\http\client.py", line 1037, in _send_output
    self.send(msg)
  File "D:\Program Files\Python310\lib\http\client.py", line 975, in send
    self.connect()
  File "D:\Program Files\Python310\lib\http\client.py", line 1447, in connect
    super().connect()
  File "D:\Program Files\Python310\lib\http\client.py", line 941, in connect
    self.sock = self._create_connection(
  File "D:\Program Files\Python310\lib\socket.py", line 845, in create_connection
    raise err
  File "D:\Program Files\Python310\lib\socket.py", line 833, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "D:\Program Files\Python310\lib\urllib\request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: &lt;urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond&gt;
python-BaseException

</code></pre>
<p>On further debugging the HTTPRequest and trying to ping the host machine, it shows that it is not reachable.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/8/2/824ecc391d635c9e062f9d56614e4814554ea20e.png" data-download-href="https://discuss.pytorch.org/uploads/default/824ecc391d635c9e062f9d56614e4814554ea20e" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/8/2/824ecc391d635c9e062f9d56614e4814554ea20e_2_690x139.png" alt="image" data-base62-sha1="iAKTsEHNPJztFyMozehOlLKEmIe" width="690" height="139" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/8/2/824ecc391d635c9e062f9d56614e4814554ea20e_2_690x139.png, https://discuss.pytorch.org/uploads/default/optimized/3X/8/2/824ecc391d635c9e062f9d56614e4814554ea20e_2_1035x208.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/8/2/824ecc391d635c9e062f9d56614e4814554ea20e_2_1380x278.png 2x" data-dominant-color="30353B"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1422×288 34.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Is anyone else facing this issue or know any workaround apart from manually downloading the cifar10 database ?</p>
<p>Runtime version -<br>
Python - 3.10.2<br>
Torch - 2.2.1+cu118<br>
Torchvision - 0.17.1+cu118</p>