ATH-MaaS/Pixelle-Video · error · ValueError

No default workflow configured for {self.service_name}. Plea

Error message

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)}

What it means

_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.

Source

Thrown at pixelle_video/services/comfy_base_service.py:185

            if "workflow_id" in content:
                workflow_info["workflow_id"] = content["workflow_id"]
        
        return workflow_info
    
    def _get_default_workflow(self) -> str:
        """
        Get default workflow from config (required, no fallback)
        
        Returns:
            Default workflow key (e.g., "runninghub/image_flux.json")
        
        Raises:
            ValueError: If default_workflow not configured
        """
        default_workflow = self.config.get("default_workflow")
        
        if not default_workflow:
            raise ValueError(
                f"No default workflow configured for {self.service_name}. "
                f"Please set 'default_workflow' in config.yaml under '{self.service_name}' section. "
                f"Available workflows: {', '.join(self.available)}"
            )
        
        return default_workflow
    
    def _resolve_workflow(self, workflow: Optional[str] = None) -> Dict[str, Any]:
        """
        Resolve workflow key to workflow info
        
        Args:
            workflow: Workflow key (e.g., "runninghub/image_flux.json")
                     If None, uses default from config
        
        Returns:
            Workflow info dict with structure:
            {

View on GitHub (pinned to 848b054e4f)

Solutions

  1. 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').
  2. Verify YAML indentation puts default_workflow inside the correct service section.
  3. Check for key spelling/casing mistakes ('default_workflow' exactly).
  4. Alternatively, pass an explicit workflow argument to the service call so _get_default_workflow is never reached.

Example fix

# before (config.yaml)
image_gen:
  api_key: xxx
# after (config.yaml)
image_gen:
  api_key: xxx
  default_workflow: runninghub/image_flux.json
Defensive patterns

Strategy: validation

Validate before calling

cfg = config.get("image_gen", {})  # your service section
if not cfg.get("default_workflow"):
    raise SystemExit("config.yaml: set 'default_workflow' under the service section before starting")

Type guard

def has_default_workflow(config: dict, service_name: str) -> bool:
    section = (config or {}).get(service_name) or {}
    return bool(section.get("default_workflow"))

Try / catch

try:
    result = service(prompt)  # uses default workflow
except ValueError as e:
    if "No default workflow configured" in str(e):
        logger.error(str(e))  # message lists available workflows
        result = service(prompt, workflow=available_keys[0])  # explicit fallback

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30). Data as JSON: /api/errors/ba2e0b8f21fa0813. Report an issue: GitHub.