{"record":{"id":"6cf5752c1fb59e2a","repo":"unslothai/unsloth","slug":"this-dataset-is-no-longer-on-disk-add-it-again-or","errorCode":null,"errorMessage":"This dataset is no longer on disk. Add it again or pick another dataset.","messagePattern":"This dataset is no longer on disk\\. Add it again or pick another dataset\\.","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"studio/backend/hub/services/datasets/formatting.py","lineNumber":354,"sourceCode":"        from itertools import islice\n\n        PREVIEW_SIZE = 10\n\n        logger.info(f\"Checking format for dataset: {request.dataset_name}\")\n\n        # An audio column decodes on the first preview row, so this precedes every tier.\n        ensure_audio_decoding()\n\n        try:\n            dataset_path = resolve_dataset_path(request.dataset_name)\n        except ValueError as e:\n            # Malformed path (null bytes, '..', outside roots) is a client error: surface 400, not 500.\n            raise HTTPException(status_code = 400, detail = str(e)) from e\n        total_rows = None\n\n        dataset_exists = dataset_path.exists()\n        if not dataset_exists and _is_local_dataset_ref(request.dataset_name):\n            raise HTTPException(status_code = 404, detail = _MISSING_DATASET_DETAIL)\n\n        if dataset_exists:\n            train_split = request.train_split or \"train\"\n            preview_slice, total_rows = _load_local_preview_slice(\n                dataset_path = dataset_path,\n                train_split = train_split,\n                preview_size = PREVIEW_SIZE,\n            )\n        else:\n            from datasets import Dataset, load_dataset\n\n            # Tier 1: list_repo_files → load only the first data file\n            cached_preview = (\n                _load_any_cached_hf_preview_slice(request, PREVIEW_SIZE, hf_token)\n                if request.prefer_local_cache\n                else None\n            )\n            if cached_preview is not None:","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/hub/services/datasets/formatting.py#L336-L372","documentation":"HTTP 404 raised while building a dataset preview when the request references a local dataset (name resolved by `resolve_dataset_path` to a local root) but that path no longer exists on disk. The `_MISSING_DATASET_DETAIL` message tells the user the on-disk dataset vanished after it was registered/selected. Only fires for local refs — hub refs fall through to remote tiers.","triggerScenarios":"Previewing an uploaded or imported local dataset after its directory was deleted, moved, or renamed outside Studio; the upload temp dir was cleaned; a native-path import pointed at a file removed since.","commonSituations":"User deleted the folder in the file explorer while it stayed in the UI list; a cleanup job swept the uploads dir; the app runs in a container and the bind-mount/volume changed.","solutions":["Re-add or re-upload the dataset, or pick another dataset as the message says.","Check the path actually exists on the machine running the backend (not the browser machine) — resolve_dataset_path resolves against server-side roots.","If using containerized Studio, verify the volume mount for the datasets dir is still attached and points at the same host path.","Refresh the local datasets list so deleted entries disappear from the picker."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef local_dataset_ready(name: str, resolver) -> bool:\n    try:\n        p = resolver(name)\n    except ValueError:\n        return False\n    return p.exists()","typeGuard":null,"tryCatchPattern":"try:\n    preview = get_preview(client, req)\nexcept HTTPStatusError as e:\n    if e.response.status_code == 404 and \"no longer on disk\" in e.response.text:\n        show_re_add_dialog(dataset_name)  # guided recovery instead of an error toast\n    else:\n        raise","preventionTips":["Verify local dataset paths exist right before each preview call rather than trusting a cached listing.","Do not delete/move upload directories out-of-band; use the app's delete endpoint.","In containers, pin the datasets volume mount so paths survive restarts."],"tags":["local-dataset","filesystem","http-404","preview"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}