ATH-MaaS/Pixelle-Video · error · ValueError

Workflow ' ' not found. Available workflows

Error message

Workflow '{workflow}' not found. Available workflows: {available_str}

What it means

_resolve_workflow() looks up the requested workflow key among workflows discovered by _scan_workflows() (keys formatted as '<source>/<filename>', e.g. 'runninghub/image_flux.json'). If the requested key doesn't match any discovered workflow, it raises ValueError listing all available keys (or 'none' if the scan found nothing). This validates user-supplied workflow names against the filesystem/workflow registry.

Solutions

  1. Use one of the exact keys listed in the error message's 'Available workflows' list.
  2. Include the full '<source>/<filename>' form (e.g. 'runninghub/image_flux.json'), not just the filename.
  3. Confirm the workflow JSON file exists in the directory scanned by _scan_workflows and has the exact name/case used in the key.
  4. If the list says 'none', fix the workflows directory configuration so the scan can find any workflows.

Example fix

# before
service(workflow='image_flux.json')
ValueError: Workflow 'image_flux.json' not found. Available workflows: runninghub/image_flux.json
# after
service(workflow='runninghub/image_flux.json')  # exact key from the available list
Defensive patterns

Strategy: validation

Validate before calling

available = {wf["key"] for wf in service._scan_workflows()}
if workflow not in available:
    raise SystemExit(f"Unknown workflow '{workflow}'. Available: {sorted(available)}")

Type guard

def workflow_exists(service, workflow: str) -> bool:
    return any(wf["key"] == workflow for wf in service._scan_workflows())

Try / catch

try:
    result = service(prompt, workflow=workflow)
except ValueError as e:
    if "not found. Available workflows:" in str(e):
        logger.error(str(e))  # lists valid keys to choose from
        result = service(prompt)  # fall back to configured default

Prevention

When it happens

Trigger: Passing a workflow argument to the service call (via __call__ -> _resolve_workflow) that doesn't exactly match a scanned key: wrong filename, missing the '<source>/' prefix, wrong case, or the workflow file being absent from the scanned directory. Also occurs when the scan directory is empty/misconfigured, producing 'Available workflows: none'.

Common situations: Typo in the workflow filename; forgetting the source prefix ('image_flux.json' instead of 'runninghub/image_flux.json'); workflow file deleted or never added to the workflows directory; workflows directory path misconfigured so the scan returns nothing; case-sensitive filesystem mismatches.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at pixelle_video/services/comfy_base_service.py:231

            ValueError: If workflow not found
        """
        # 1. If not specified, use default from config
        if workflow is None:
            workflow = self._get_default_workflow()
        
        # 2. Scan available workflows
        available_workflows = self._scan_workflows()
        
        # 3. Find matching workflow by key
        for wf_info in available_workflows:
            if wf_info["key"] == workflow:
                logger.info(f"🎬 Using {self.service_name} workflow: {workflow}")
                return wf_info
        
        # 4. Not found - generate error message
        available_keys = [wf["key"] for wf in available_workflows]
        available_str = ", ".join(available_keys) if available_keys else "none"
        raise ValueError(
            f"Workflow '{workflow}' not found. "
            f"Available workflows: {available_str}"
        )
    
    def _prepare_comfykit_config(
        self,
        comfyui_url: Optional[str] = None,
        runninghub_api_key: Optional[str] = None,
        runninghub_instance_type: Optional[str] = None,
    ) -> Dict[str, Any]:
        """
        Prepare ComfyKit configuration
        
        Args:
            comfyui_url: ComfyUI URL (optional, overrides config)
            runninghub_api_key: RunningHub API key (optional, overrides config)
            runninghub_instance_type: RunningHub instance type (optional, overrides config)
        

View on GitHub (pinned to 848b054e4f)