{"record":{"id":"3225168e9e1460c0","repo":"ATH-MaaS/Pixelle-Video","slug":"no-video-generated","errorCode":null,"errorMessage":"No video generated","messagePattern":"No video generated","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/media.py","lineNumber":287,"sourceCode":"            else:\n                # Selfhost: pass file path (ComfyKit will use local ComfyUI)\n                workflow_input = workflow_info[\"path\"]\n                logger.info(f\"Executing selfhost workflow: {workflow_input}\")\n            \n            result = await kit.execute(workflow_input, workflow_params)\n            \n            # 5. Handle result based on specified media_type\n            if result.status != \"completed\":\n                error_msg = result.msg or \"Unknown error\"\n                logger.error(f\"Media generation failed: {error_msg}\")\n                raise Exception(f\"Media generation failed: {error_msg}\")\n            \n            # Extract media based on specified type\n            if media_type == \"video\":\n                # Video workflow - get video from result\n                if not result.videos:\n                    logger.error(\"No video generated (workflow returned no videos)\")\n                    raise Exception(\"No video generated\")\n                \n                video_url = result.videos[0]\n                logger.info(f\"✅ Generated video: {video_url}\")\n                \n                # Try to extract duration from result (if available)\n                duration = None\n                if hasattr(result, 'duration') and result.duration:\n                    duration = result.duration\n                \n                return MediaResult(\n                    media_type=\"video\",\n                    url=video_url,\n                    duration=duration\n                )\n            else:  # image\n                # Image workflow - get image from result\n                if not result.images:\n                    logger.error(\"No image generated (workflow returned no images)\")","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/media.py#L269-L305","documentation":"After a workflow run reports status 'completed', MediaService.__call__ expects at least one entry in result.videos for media_type == 'video'. If the completed run produced no video outputs, it raises 'No video generated'. This means the workflow succeeded but its outputs did not include a video node, or the outputs were not mapped into result.videos by ComfyKit.","triggerScenarios":"kit.execute() returns status 'completed' but result.videos is empty/None while media_type == 'video' — typically because the workflow's save/output node saves images (e.g. VHS_VideoCombine misconfigured to output frames), the video output node is muted/bypassed, or ComfyKit failed to classify the output as a video.","commonSituations":"Using an image-generation workflow JSON with media_type='video'; Video Combine node configured with format that yields images or with save_output disabled; RunningHub workflow outputs not declared so the platform returns no video files; ComfyKit version that doesn't parse the output node type into result.videos.","solutions":["Inspect the workflow: ensure it contains an active video output node (e.g. VHS_VideoCombine with a video format) and that its output is registered/saved.","Confirm the workflow_id/file actually matches media_type — a common mistake is pointing the video pipeline at an image workflow.","Check the ComfyKit result object in debug logs (result.__dict__/files) to see where the output landed; if it's in files/outputs rather than videos, upgrade ComfyKit or adjust the output node.","If using RunningHub, verify the workflow's output node is exposed so the API returns the generated video file.","Add a fallback that logs all result outputs before raising so mismatches between output type and result.videos are diagnosable."],"exampleFix":"// before\nif not result.videos:\n    raise Exception(\"No video generated\")\n// after\nvideos = getattr(result, \"videos\", None) or [f for f in getattr(result, \"files\", []) or [] if f.endswith((\".mp4\", \".webm\", \".mov\"))]\nif not videos:\n    raise Exception(f\"No video generated; outputs={getattr(result, 'outputs', None)}\")\nvideo_url = videos[0]","handlingStrategy":"validation","validationCode":"# pre-flight: ensure the workflow actually produces video output\ndef workflow_produces_video(workflow_json: dict) -> bool:\n    nodes = workflow_json.get(\"nodes\", [])\n    return any(\"VideoCombine\" in (n.get(\"type\", \"\")) or \"SaveVideo\" in (n.get(\"type\", \"\"))\n               for n in nodes if not n.get(\"mode\"))  # mode != 4/2 means enabled\n# and confirm media_type matches the configured workflow:\nassert media_type == \"video\" and workflow_produces_video(load_workflow(workflow_key))","typeGuard":"def has_video_output(result) -> bool:\n    return bool(getattr(result, \"videos\", None))","tryCatchPattern":"try:\n    media = await media_service(...)\nexcept Exception as e:\n    if \"No video generated\" in str(e):\n        logger.error(\"workflow completed with no video; check output node config: %s\", getattr(e, 'outputs', None))\n        raise WorkflowConfigError(\"video workflow has no active video output node\") from e\n    raise","preventionTips":["Match media_type to the workflow type in config; never point the video pipeline at an image graph.","Keep a video output node (e.g. VHS_VideoCombine) enabled and saving output in every video workflow.","Expose output nodes when publishing RunningHub workflows.","Log the full result object on empty outputs to catch ComfyKit schema drift after upgrades."],"tags":["workflow-output","comfyui","video","missing-output"],"backgroundTag":"empty-workflow-output","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}