{"record":{"id":"07764f01b0f6b605","repo":"ATH-MaaS/Pixelle-Video","slug":"no-description-generated-from-video-analysis","errorCode":null,"errorMessage":"No description generated from video analysis","messagePattern":"No description generated from video analysis","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/video_analysis.py","lineNumber":197,"sourceCode":"            if not description and result.outputs and 'raw_data' in result.outputs:\n                raw_data = result.outputs['raw_data']\n                if raw_data and len(raw_data) > 0:\n                    # Find text file entry\n                    for item in raw_data:\n                        if item.get('fileType') == 'txt' and 'fileUrl' in item:\n                            # Download text content from URL\n                            import aiohttp\n                            async with aiohttp.ClientSession() as session:\n                                async with session.get(item['fileUrl']) as resp:\n                                    if resp.status == 200:\n                                        description = await resp.text()\n                                        description = description.strip()\n                                        logger.debug(f\"Downloaded description from URL: {description[:100]}...\")\n                                        break\n            \n            if not description:\n                logger.error(f\"No text found in result. Status: {result.status}, Outputs: {result.outputs}, Texts: {result.texts}\")\n                raise Exception(\"No description generated from video analysis\")\n            \n            logger.info(f\"✅ Video analyzed: {description[:100]}...\")\n            \n            return description\n        \n        except Exception as e:\n            logger.error(f\"Video analysis error: {e}\")\n            raise\n","sourceCodeStart":179,"sourceCodeEnd":206,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/video_analysis.py#L179-L206","documentation":"After a \"completed\" workflow run, the analyzer parses result.outputs/result.texts (including following URL references to fetch the text) and raises if no description string could be extracted. It means the workflow technically succeeded but produced no usable text output.","triggerScenarios":"The analyse_video workflow completed but returned empty/absent texts — e.g. workflow output node renamed so result.texts is empty, the model returned an empty response, or the description was only reachable via a URL that failed to download.","commonSituations":"Workflow JSON updated so the output key no longer matches what this code parses; vision model returning blank output for low-information videos; network failure when downloading a URL-hosted description.","solutions":["Log/inspect result.outputs and result.texts (the error logs them) to see what shape came back","Update the workflow JSON so its output node emits texts in the expected format","Check network/proxy access if the description is delivered via URL download","Test the same video directly against the workflow console to confirm it can produce a description"],"exampleFix":"// before\ndescription = parse_outputs(result)  # raises if empty\n// after\nif not result.texts:\n    raise RuntimeError(f'no texts in result: outputs={result.outputs}')\ndescription = result.texts[0]","handlingStrategy":"validation","validationCode":"def result_has_text(result) -> bool:\n    texts = getattr(result, 'texts', None) or []\n    return any(t and t.strip() for t in texts)","typeGuard":"def has_description(result) -> bool:\n    texts = getattr(result, 'texts', None)\n    return isinstance(texts, list) and len(texts) > 0 and bool(texts[0])","tryCatchPattern":"try:\n    description = await analyzer(video_path=vp)\nexcept Exception as e:\n    if 'No description generated' in str(e):\n        logger.error(f'empty workflow output, result={result.outputs}')\n        raise WorkflowOutputError(result) from e\n    raise","preventionTips":["Pin and test the workflow JSON so output keys stay compatible with the parser","Monitor model responses for empty outputs and alert on them","Ensure outbound network access for URL-based description delivery"],"tags":["video-analysis","workflow","empty-output","parsing"],"backgroundTag":"empty-workflow-output","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}