{"record":{"id":"ba2e0b8f21fa0813","repo":"ATH-MaaS/Pixelle-Video","slug":"no-default-workflow-configured-for-self-service-n","errorCode":null,"errorMessage":"No default workflow configured for {self.service_name}. Please set 'default_workflow' in config.yaml under '{self.service_name}' section. Available workflows: {', '.join(self.available)}","messagePattern":"No default workflow configured for (.+?)\\. Please set 'default_workflow' in config\\.yaml under '(.+?)' section\\. Available workflows: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/comfy_base_service.py","lineNumber":185,"sourceCode":"            if \"workflow_id\" in content:\n                workflow_info[\"workflow_id\"] = content[\"workflow_id\"]\n        \n        return workflow_info\n    \n    def _get_default_workflow(self) -> str:\n        \"\"\"\n        Get default workflow from config (required, no fallback)\n        \n        Returns:\n            Default workflow key (e.g., \"runninghub/image_flux.json\")\n        \n        Raises:\n            ValueError: If default_workflow not configured\n        \"\"\"\n        default_workflow = self.config.get(\"default_workflow\")\n        \n        if not default_workflow:\n            raise ValueError(\n                f\"No default workflow configured for {self.service_name}. \"\n                f\"Please set 'default_workflow' in config.yaml under '{self.service_name}' section. \"\n                f\"Available workflows: {', '.join(self.available)}\"\n            )\n        \n        return default_workflow\n    \n    def _resolve_workflow(self, workflow: Optional[str] = None) -> Dict[str, Any]:\n        \"\"\"\n        Resolve workflow key to workflow info\n        \n        Args:\n            workflow: Workflow key (e.g., \"runninghub/image_flux.json\")\n                     If None, uses default from config\n        \n        Returns:\n            Workflow info dict with structure:\n            {","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/comfy_base_service.py#L167-L203","documentation":"_get_default_workflow() reads self.config['default_workflow'] for a ComfyUI-backed service and, per its docstring, has no fallback. If the key is missing, empty, or None in the service's config.yaml section, it raises ValueError instructing the developer to set 'default_workflow' under the '<service_name>' section, listing the available workflow keys. _resolve_workflow() calls this whenever no explicit workflow argument is supplied, so any default call path fails without configuration.","triggerScenarios":"Calling the service (via __call__ -> _resolve_workflow -> _get_default_workflow) without passing a workflow name, while config.yaml has no 'default_workflow' entry (or it's empty string/null) under the service's section.","commonSituations":"Fresh deployment with a partially filled config.yaml; key typo (e.g. 'default-workflow' or 'defaultWorkflow'); YAML indentation placing default_workflow outside the service section; environment where config was loaded but the service section was omitted.","solutions":["Add `default_workflow: <key>` under the service's section in config.yaml, using one of the keys listed in the error (e.g. 'runninghub/image_flux.json').","Verify YAML indentation puts default_workflow inside the correct service section.","Check for key spelling/casing mistakes ('default_workflow' exactly).","Alternatively, pass an explicit workflow argument to the service call so _get_default_workflow is never reached."],"exampleFix":"# before (config.yaml)\nimage_gen:\n  api_key: xxx\n# after (config.yaml)\nimage_gen:\n  api_key: xxx\n  default_workflow: runninghub/image_flux.json","handlingStrategy":"validation","validationCode":"cfg = config.get(\"image_gen\", {})  # your service section\nif not cfg.get(\"default_workflow\"):\n    raise SystemExit(\"config.yaml: set 'default_workflow' under the service section before starting\")","typeGuard":"def has_default_workflow(config: dict, service_name: str) -> bool:\n    section = (config or {}).get(service_name) or {}\n    return bool(section.get(\"default_workflow\"))","tryCatchPattern":"try:\n    result = service(prompt)  # uses default workflow\nexcept ValueError as e:\n    if \"No default workflow configured\" in str(e):\n        logger.error(str(e))  # message lists available workflows\n        result = service(prompt, workflow=available_keys[0])  # explicit fallback","preventionTips":["Always define default_workflow for every ComfyUI-backed service section in config.yaml.","Validate config.yaml against a schema (e.g. pydantic/jsonschema) at startup.","Watch for YAML indentation and key spelling when editing config.","Prefer passing an explicit workflow in code paths where config may be incomplete."],"tags":["python","configuration","valueerror","workflow","comfyui"],"backgroundTag":"missing-config-key","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}