Skip to content

The URL for the SUN397 dataset isn't working #9348

@jshn9515

Description

@jshn9515

🐛 Describe the bug

The URL for the SUN397 dataset seems to be dead.

import torchvision.datasets as datasets

dataset = datasets.SUN397('datasets', download=True)

The output is:

Traceback (most recent call last):
  File "d:\Project\Python Project\cc.py", line 3, in <module>
    dataset = datasets.SUN397('datasets', download=True)
  File "D:\Project\Python Project\venv\Lib\site-packages\torchvision\datasets\sun397.py", line 44, in __init__
    self._download()
    ~~~~~~~~~~~~~~^^
  File "D:\Project\Python Project\venv\Lib\site-packages\torchvision\datasets\sun397.py", line 81, in _download
    download_and_extract_archive(self._DATASET_URL, download_root=self.root, md5=self._DATASET_MD5)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Project\Python Project\venv\Lib\site-packages\torchvision\datasets\utils.py", line 388, in download_and_extract_archive
    download_url(url, download_root, filename, md5)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Project\Python Project\venv\Lib\site-packages\torchvision\datasets\utils.py", line 118, in download_url
    url = _get_redirect_url(url, max_hops=max_redirect_hops)
  File "D:\Project\Python Project\venv\Lib\site-packages\torchvision\datasets\utils.py", line 63, in _get_redirect_url
    with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response:
         ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 187, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 493, in open
    response = meth(req, response)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 525, in error
    result = self._call_chain(*args)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 464, in _call_chain
    result = func(*args)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 718, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 493, in open
    response = meth(req, response)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 525, in error
    result = self._call_chain(*args)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 464, in _call_chain
    result = func(*args)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 718, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 493, in open
    response = meth(req, response)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 531, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 464, in _call_chain
    result = func(*args)
  File "C:\Users\jshn9\AppData\Local\Programs\Python\Python314\Lib\urllib\request.py", line 611, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Versions

PyTorch version: 2.9.1+xpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 (10.0.26200 64 bit)
GCC version: (x86_64-posix-seh-rev0, Built by MinGW-Builds project) 15.2.0
Clang version: Could not collect
CMake version: version 4.2.0
Libc version: N/A

Python version: 3.14.2 (tags/v3.14.2:df79316, Dec 5 2025, 17:18:21) [MSC v.1944 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.26200-SP0
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: True
XPU used to build PyTorch: 20250200
Intel GPU driver version:

  • 32.0.101.7026 (20250819000000.***+)
    Intel GPU models onboard:
  • Intel(R) Arc(TM) 140T GPU (16GB)
    Intel GPU models detected:
  • [0] _XpuDeviceProperties(name='Intel(R) Arc(TM) 140T GPU (16GB)', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0x7D51, uuid=8680517d-0300-0000-0002-000000000000, driver_version='1.6.34541', total_memory=16797MB, max_compute_units=128, gpu_eu_count=128, gpu_subslice_count=16, max_work_group_size=1024, max_num_sub_groups=128, sub_group_sizes=[8 16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
    HIP runtime version: N/A
    MIOpen runtime version: N/A
    Is XNNPACK available: True
    Caching allocator config: N/A

CPU:
Name: Intel(R) Core(TM) Ultra 7 255H
Manufacturer: GenuineIntel
Family: 774
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2000
MaxClockSpeed: 2000
L2CacheSize: 28672
L2CacheSpeed: None
Revision: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions