{"record":{"id":"ddff835863536186","repo":"abi/screenshot-to-code","slug":"eval-set-request-set-name-r-has-no-images","errorCode":null,"errorMessage":"Eval set {request.set_name!r} has no images","messagePattern":"Eval set (.+?) has no images","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"warning","filePath":"backend/routes/evals.py","lineNumber":132,"sourceCode":"    set_name: Optional[str] = None\n\n\ndef _resolve_set_run(\n    request: RunEvalsRequest,\n) -> tuple[Optional[str], Optional[eval_sessions.EvalSession], Dict[str, set[str]]]:\n    \"\"\"Validate the requested set and resolve the session + per-model skips.\"\"\"\n    if not request.set_name:\n        return None, None, {}\n    try:\n        set_info = eval_sets.get_set(request.set_name)\n    except eval_sets.InvalidSetNameError as e:\n        raise HTTPException(status_code=400, detail=str(e))\n    except eval_sets.EvalSetNotFoundError:\n        raise HTTPException(\n            status_code=404, detail=f\"Eval set not found: {request.set_name}\"\n        )\n    if set_info.image_count == 0:\n        raise HTTPException(\n            status_code=400, detail=f\"Eval set {request.set_name!r} has no images\"\n        )\n    try:\n        session = eval_sessions.resolve_session_for_run(request.set_name)\n    except eval_sessions.SessionSetMismatchError as e:\n        raise HTTPException(\n            status_code=400,\n            detail=(\n                f\"Active session {e.active_session.name!r} is pinned to set \"\n                f\"{e.active_session.eval_set!r}. Start a new session for set \"\n                f\"{request.set_name!r} first (POST /eval-sessions).\"\n            ),\n        )\n    skip_per_model: Dict[str, set[str]] = {}\n    if request.diff_mode:\n        for model in request.models:\n            skip_per_model[model] = eval_sessions.completed_eval_inputs(\n                session.session_id, model, str(request.stack)","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/abi/screenshot-to-code/blob/d026163f586dfa8c5c10d28c36edd59a9d3b0e88/backend/routes/evals.py#L114-L150","documentation":"400 raised inside _resolve_set_run in backend/routes/evals.py:132 when the requested set exists but set_info.image_count is 0. A set with no images has nothing to evaluate, so the run is rejected before a session is resolved.","triggerScenarios":"POST /run_evals_stream with a well-formed, existing set_name whose inputs directory contains no images (set created but uploads never completed, or images were removed).","commonSituations":"Set-creation flow interrupted before image upload; images uploaded to the wrong subfolder; set created from a text brief when the run path expects images.","solutions":["Add images to the set using the eval-set upload endpoint, then retry.","Verify with the set-info endpoint that image_count > 0 before starting a run.","If the set is meant to be text-only, check whether the run path supports briefs for this operation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const info = await (await fetch(`/eval-sets/${setName}`)).json();\nif (info.image_count === 0) throw new Error('Set has no images; upload inputs first');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enforce a non-empty image count in set creation/upload UI before allowing runs.","Surface image_count in the set picker so empty sets are visible."],"tags":["http-400","eval-sets","validation","fastapi"],"backgroundTag":null,"analyzedSha":"d026163f586dfa8c5c10d28c36edd59a9d3b0e88","analyzedAt":"2026-08-14T22:02:06.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}