unslothai/unsloth · error · FileNotFoundError
unstructured seed file not found: {resolved}
Error message
unstructured seed file not found: {resolved} What it means
FileNotFoundError raised by materialize_unstructured_seed_dataset when the configured source_path (after expanduser().resolve()) is not an existing regular file. The check runs before chunking, cache-key computation, and parquet materialization, and the message includes the fully resolved path so relative-path or tilde-expansion mistakes are visible.
Source
Thrown at studio/backend/plugins/data-designer-unstructured-seed/src/data_designer_unstructured_seed/chunking.py:110
if len(result) >= preview_size:
break
val = next(it, None)
if val is not None:
result.append(val)
else:
exhausted.append(i)
for i in reversed(exhausted):
iterators.pop(i)
return result
def materialize_unstructured_seed_dataset(
*, source_path: Path, chunk_size: Any, chunk_overlap: Any
) -> tuple[Path, list[dict[str, str]]]:
resolved = source_path.expanduser().resolve()
if not resolved.is_file():
raise FileNotFoundError(f"unstructured seed file not found: {resolved}")
size, overlap = resolve_chunking(chunk_size, chunk_overlap)
key = _compute_cache_key(
source_path = resolved,
chunk_size = size,
chunk_overlap = overlap,
)
parquet_path = _CACHE_DIR / f"{key}.parquet"
if parquet_path.exists():
return parquet_path, []
text = load_unstructured_text_file(resolved)
chunks = split_text_into_chunks(
text = text,
chunk_size = size,
chunk_overlap = overlap,
)
if not chunks:View on GitHub (pinned to 203007d190)
Solutions
- Verify the exact resolved path printed in the error exists: ls -l <resolved path>.
- If relative, pass an absolute path (Path.cwd() / rel or Path(rel).resolve()) or fix the service working directory.
- For uploaded files, ensure the temp file lifetime covers the async processing job, or copy to a stable staging location first.
Example fix
# before
source_path = Path("data/notes.txt") # cwd differs at runtime
# after
source_path = Path("/srv/uploads/notes.txt") # absolute, verified to exist Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def seed_file_ok(source_path: str | Path) -> bool:
p = Path(source_path).expanduser().resolve()
return p.is_file() and p.stat().st_size > 0 Try / catch
from pathlib import Path
resolved = Path(source_path).expanduser().resolve()
if not resolved.is_file():
raise FileNotFoundError(resolved) # fail before calling the plugin, with your own context Prevention
- Always pass absolute paths derived from a single config root.
- Keep uploaded files alive until the async processing job completes (or copy to a staging dir).
When it happens
Trigger: Passing source_path pointing to a missing file, a directory, a symlink to a deleted file, or a relative path resolved against an unexpected working directory (e.g. running the service from a different cwd).
Common situations: Upload temp file already cleaned up when the processing job starts; container paths differing from host paths; path built by concatenating strings that drops a slash; file processed twice with cleanup in between.
Related errors
- Local model path does not exist: {repo_id}
- no .safetensors/.gguf LoRA file found in '{repo_id}'
- {exc}
- Local model path '{repo_id}' does not exist.
- data_dir is not a directory: {data_dir}
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/f7e9f1f46d3e2234.
Report an issue: GitHub.