ATH-MaaS/Pixelle-Video · error · Exception
Video analysis failed: {error_msg}
Error message
Video analysis failed: {error_msg} What it means
After executing the video-understanding workflow via kit.execute, the analyzer checks result.status and raises a generic Exception if it is not "completed", carrying the workflow's own message. This surfaces upstream workflow/kit failures (API errors, content moderation, workflow misconfiguration) as a Python exception.
Source
Thrown at pixelle_video/services/video_analysis.py:155
kit = await self.core._get_or_create_comfykit()
# Determine what to pass to ComfyKit based on source
if workflow_info["source"] == "runninghub" and "workflow_id" in workflow_info:
# RunningHub: pass workflow_id
workflow_input = workflow_info["workflow_id"]
logger.info(f"Executing RunningHub workflow: {workflow_input}")
else:
# Selfhost: pass file path
workflow_input = workflow_info["path"]
logger.info(f"Executing selfhost workflow: {workflow_input}")
result = await kit.execute(workflow_input, workflow_params)
# 6. Extract description from result
if result.status != "completed":
error_msg = result.msg or "Unknown error"
logger.error(f"Video analysis failed: {error_msg}")
raise Exception(f"Video analysis failed: {error_msg}")
# Extract text description from result
# Video understanding workflow returns text in result.texts array
description = None
# Format 1: Direct texts array (most common for video understanding)
if result.texts and len(result.texts) > 0:
description = result.texts[0]
logger.debug(f"Found description in result.texts: {description[:100]}...")
# Format 2: Selfhost outputs (direct text in outputs)
# Format: {'6': {'text': ['description text']}}
elif result.outputs:
for node_id, node_output in result.outputs.items():
if 'text' in node_output:
text_list = node_output['text']
if text_list and len(text_list) > 0:
description = text_list[0]View on GitHub (pinned to 848b054e4f)
Solutions
- Read error_msg in the exception — it is the workflow backend's own message
- Verify workflow service credentials and that the workflow named by resolve_workflow_path loads correctly
- Retry on transient statuses if the message indicates timeout/rate limits
- Validate the video meets backend limits (size, duration, codec) before calling
Example fix
// before
result = await kit.execute(workflow_input, workflow_params)
description = result.texts[0] # may raise or be empty
// after
result = await kit.execute(workflow_input, workflow_params)
if result.status != 'completed':
logger.error(result.msg)
raise RuntimeError(f'workflow failed: {result.msg}') Defensive patterns
Strategy: try-catch
Validate before calling
def validate_workflow_inputs(video_path: str, workflow) -> None:
assert Path(video_path).is_file(), 'video must exist'
assert workflow is None or Path(workflow).is_file(), 'workflow json must exist'
# plus pre-call credential check
assert os.getenv('WORKFLOW_API_KEY'), 'workflow credentials missing' Try / catch
result = None
for attempt in range(3):
try:
description = await analyzer(video_path=vp)
break
except Exception as e:
logger.warning(f'analysis attempt {attempt} failed: {e}')
if attempt == 2:
raise Prevention
- Log result.status and result.msg on every workflow run
- Health-check workflow service credentials before batch jobs
- Validate videos against backend size/duration limits before submission
When it happens
Trigger: kit.execute returns a result whose status != 'completed' with result.msg describing why — e.g. invalid API credentials for the workflow backend, workflow JSON resolving to a broken graph, input video rejected/too large, or the workflow runner timing out.
Common situations: Expired or missing workflow-service API keys; the analyse_video workflow JSON edited/broken; video exceeding platform limits (duration/size); transient service outages.
Related errors
- No description generated from video analysis
- str(e)
- str(e)
- API VLM analysis returned empty description
- API workflow '{workflow}' not found. Available API workflows
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/ede7f5b0e033be59.
Report an issue: GitHub.