{"record":{"id":"9a29ff48fd286a72","repo":"calesthio/OpenMontage","slug":"prediction-prediction-id-reported-last-status","errorCode":null,"errorMessage":"Prediction {prediction_id} reported '{last_status}' but returned no outputs.","messagePattern":"Prediction (.+?) reported '(.+?)' but returned no outputs\\.","errorType":"exception","errorClass":"AtlasError","httpStatus":null,"severity":"error","filePath":"tools/atlas_client.py","lineNumber":169,"sourceCode":"            consecutive_transport_errors += 1\n            if consecutive_transport_errors >= 5:\n                raise AtlasError(\n                    f\"Polling prediction {prediction_id} failed after \"\n                    f\"{consecutive_transport_errors} consecutive transport errors: {exc}\"\n                ) from exc\n            time.sleep(interval)\n            elapsed += interval\n            continue\n\n        _raise_for_status(response, f\"Atlas Cloud poll for {prediction_id}\")\n        consecutive_transport_errors = 0\n        data = _payload_of(response)\n        last_status = str(data.get(\"status\", \"unknown\")).lower()\n\n        if last_status in TERMINAL_SUCCESS:\n            outputs = data.get(\"outputs\") or []\n            if not outputs:\n                raise AtlasError(\n                    f\"Prediction {prediction_id} reported '{last_status}' but returned no outputs.\"\n                )\n            return data\n        if last_status in TERMINAL_FAILURE:\n            error = data.get(\"error\") or \"no error detail provided\"\n            raise AtlasError(f\"Atlas Cloud generation failed ({last_status}): {error}\")\n\n        time.sleep(interval)\n        elapsed += interval\n\n    raise AtlasError(\n        f\"Prediction {prediction_id} did not finish within {timeout:.0f}s \"\n        f\"(last status: {last_status}). The job may still complete — \"\n        f\"check {PREDICTION_ENDPOINT}/{prediction_id}\"\n    )\n\n\ndef upload_media(file_path: str | Path, api_key: str, timeout: int = 120) -> str:","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/atlas_client.py#L151-L187","documentation":"Raised by poll when the prediction reaches a terminal-success status (e.g. succeeded) but the outputs list in the response is empty or missing. The job claims completion yet produced nothing downloadable, which the client treats as a hard failure rather than returning an empty result that downstream code would mis-handle.","triggerScenarios":"A video/image model finishing with zero output files (server-side rendering bug, content policy silently dropping output, output upload to storage failing after render); envelope drift where outputs moved to another field name (e.g. output singular).","commonSituations":"Safety filters consuming the generation without setting a failure status; transient storage-upload failures on Atlas's side; API version changes renaming the outputs field; zero-second or degenerate generation parameters producing no frames.","solutions":["Retry the generation — if it was a transient storage/render glitch the rerun succeeds","Inspect the full prediction JSON via the documented PREDICTION_ENDPOINT/<id> to see logs/alternate output fields","Loosen prompt/parameters if content filtering is suspected (this is speculative — check the job's error/logs fields)","If the field was renamed by an API update, update the client's outputs key"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    data = atlas_client.poll(pid, api_key)\nexcept AtlasError as e:\n    if \"returned no outputs\" in str(e):\n        data = atlas_client.poll(*resubmit(endpoint, payload, api_key), api_key)  # one regeneration\n    else:\n        raise","preventionTips":["Treat 'succeeded but empty' as a regeneration event, not a programming bug","Inspect the full prediction record URL before retrying to check for filter/log clues","Keep prompts and parameters within documented model constraints"],"tags":["atlas-cloud","polling","outputs","empty-result","api-contract"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}