{"record":{"id":"453db4dd304a7d82","repo":"ATH-MaaS/Pixelle-Video","slug":"no-description-generated","errorCode":null,"errorMessage":"No description generated","messagePattern":"No description generated","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/image_analysis.py","lineNumber":189,"sourceCode":"            # Format: {'raw_data': [{'fileUrl': 'https://...txt', 'fileType': 'txt', ...}]}\n            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                                        break\n            \n            if not description:\n                logger.error(f\"No text found in outputs: {result.outputs}\")\n                raise Exception(\"No description generated\")\n            \n            logger.info(f\"✅ Image analyzed: {description[:100]}...\")\n            \n            return description\n        \n        except Exception as e:\n            logger.error(f\"Image analysis error: {e}\")\n            raise\n","sourceCodeStart":171,"sourceCodeEnd":198,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/image_analysis.py#L171-L198","documentation":"Raised when the workflow finished with status \"completed\" but the service could not extract any text description from result.outputs. It tries two formats — selfhost text outputs ({'6': {'text': [...]}}) and RunningHub raw_data txt file URLs — and raises if neither yields non-empty text.","triggerScenarios":"Workflow completed but its LLM/text node output node id changed so 'text' key is absent from outputs; RunningHub returned raw_data without a fileType=='txt' item; the txt fileUrl download returned non-200; or outputs is empty/None.","commonSituations":"Edited or upgraded workflow JSON renamed the output node; backend switched between selfhost and RunningHub so the output format changed; RunningHub returned a URL that expired before download; text node produced an empty string.","solutions":["Inspect the logged 'No text found in outputs: {...}' payload to see the actual output shape","Update the workflow so a text-output node (e.g. ShowText/SaveText) is present and enabled","Extend the extraction to cover the new output format for the backend you use","If using RunningHub, check the raw_data entry fileType/fileUrl and confirm the txt URL is still downloadable"],"exampleFix":"// before\nif 'text' in node_output:\n    description = node_output['text'][0]\n// after\nif 'text' in node_output and node_output['text']:\n    description = node_output['text'][0]\nelif 'string' in node_output and node_output['string']:\n    description = node_output['string'][0]","handlingStrategy":"fallback","validationCode":"def outputs_contain_text(outputs) -> bool:\n    if not outputs:\n        return False\n    if any('text' in o and o['text'] for o in outputs.values()):\n        return True\n    rd = outputs.get('raw_data') or []\n    return any(i.get('fileType') == 'txt' and i.get('fileUrl') for i in rd)","typeGuard":"def extract_text_output(node_output) -> str | None:\n    if isinstance(node_output, dict):\n        texts = node_output.get('text') or node_output.get('string')\n        if isinstance(texts, list) and texts and isinstance(texts[0], str):\n            return texts[0]\n    return None","tryCatchPattern":"try:\n    desc = await analyzer(image_path=img, source=src)\nexcept Exception as e:\n    logger.warning(f\"no description extracted ({e}); using placeholder\")\n    desc = \"(no description available)\"","preventionTips":["Pin and test the analysis workflow JSON — output node ids/keys are the contract","After backend upgrades, run one smoke analysis and log result.outputs to verify format","Download RunningHub txt URLs promptly; they can expire","Treat empty-string outputs the same as missing and handle explicitly"],"tags":["python","output-parsing","comfyui"],"backgroundTag":"empty-workflow-output","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}