{"record":{"id":"bc924bda5a490642","repo":"unslothai/unsloth","slug":"unstructured-seed-support-not-available-missing-d","errorCode":null,"errorMessage":"Unstructured seed support not available (missing data_designer_unstructured_seed)","messagePattern":"Unstructured seed support not available \\(missing data_designer_unstructured_seed\\)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"studio/backend/routes/data_recipe/seed.py","lineNumber":255,"sourceCode":"        raise\n    except (ValueError, OSError) as exc:\n        raise log_and_http_error(\n            exc,\n            422,\n            \"seed inspect failed\",\n            event = \"data_recipe.seed.local_preview_failed\",\n            log = logger,\n        ) from exc\n\n    rows = df.to_dict(orient = \"records\")\n    return _serialize_preview_rows(rows)\n\n\ndef _read_preview_rows_from_unstructured_file(\n    *, path: Path, preview_size: int, chunk_size: int | None, chunk_overlap: int | None\n) -> list[dict[str, Any]]:\n    if resolve_chunking is None or build_unstructured_preview_rows is None:\n        raise HTTPException(\n            500,\n            \"Unstructured seed support not available (missing data_designer_unstructured_seed)\",\n        )\n    size, overlap = resolve_chunking(chunk_size, chunk_overlap)\n    try:\n        rows = build_unstructured_preview_rows(\n            source_path = path,\n            preview_size = preview_size,\n            chunk_size = size,\n            chunk_overlap = overlap,\n        )\n    except (FileNotFoundError, RuntimeError, ValueError, OSError) as exc:\n        raise log_and_http_error(\n            exc,\n            422,\n            \"seed inspect failed\",\n            event = \"data_recipe.seed.unstructured_preview_failed\",\n            log = logger,","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/routes/data_recipe/seed.py#L237-L273","documentation":"HTTP 500 raised by _read_preview_rows_from_unstructured_file when the optional module data_designer_unstructured_seed could not be imported (the functions resolve_chunking / build_unstructured_preview_rows are None). The unstructured-seed feature is an optional dependency, so the route degrades to a 500 when it is absent.","triggerScenarios":"POST /seed/inspect-upload with unstructured files (pdf/docx/txt/md) on a backend installation where the data_designer_unstructured_seed extra was never installed or its import failed.","commonSituations":"Slim install without optional extras; partial virtualenv; dependency renamed or moved in a version bump; module raises on import due to its own missing deps (e.g. pdf parser) leaving the names None.","solutions":["Install the optional unstructured-seed extra for studio backend (e.g. pip install 'gretel-studio[unstructured]' or add data_designer_unstructured_seed to the environment).","Check backend startup logs for the ImportError that zeroed these symbols and fix the underlying missing package.","Until installed, avoid the unstructured preview path — use CSV/JSON seeds."],"exampleFix":"# before\npip install studio-backend\n\n# after\npip install 'studio-backend[unstructured-seed]'","handlingStrategy":"fallback","validationCode":"// Probe capability once at app start\nconst capabilities = await fetch('/data_recipe/capabilities').then(r => r.json());\nif (!capabilities.unstructuredSeed) disableUnstructuredUI();","typeGuard":null,"tryCatchPattern":"Catch HTTPException 500 with 'Unstructured seed support not available' and degrade gracefully: hide unstructured options and show an install hint, since retrying cannot help.","preventionTips":["Install backend with the unstructured-seed extra in every environment (dev, CI, prod).","Expose a capabilities endpoint so the frontend can detect the feature before users hit the 500.","Watch backend startup logs for silent optional-import failures."],"tags":["optional-dependency","import-error","http-500","unstructured"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}