ATH-MaaS/Pixelle-Video · error · ValueError

Unknown pipeline: '{pipeline}'. Available pipelines: {availa

Error message

Unknown pipeline: '{pipeline}'. Available pipelines: {available}

What it means

generate_video_wrapper looks up the requested pipeline name in self.pipelines and raises ValueError for names not registered. The message lists all registered pipelines so the caller can pick a valid one.

Source

Thrown at pixelle_video/service.py:292

                VideoGenerationResult
            
            Examples:
                # Use standard pipeline (default)
                result = await pixelle_video.generate_video(
                    text="如何提高学习效率",
                    n_scenes=5
                )
                
                # Use custom pipeline
                result = await pixelle_video.generate_video(
                    text=your_content,
                    pipeline="custom",
                    custom_param_example="custom_value"
                )
            """
            if pipeline not in self.pipelines:
                available = ", ".join(self.pipelines.keys())
                raise ValueError(
                    f"Unknown pipeline: '{pipeline}'. "
                    f"Available pipelines: {available}"
                )
            
            pipeline_instance = self.pipelines[pipeline]
            return await pipeline_instance(text=text, **kwargs)
        
        return generate_video_wrapper
    
    @property
    def project_name(self) -> str:
        """Get project name from config"""
        return self.config.get("project_name", "Pixelle-Video")
    
    def __repr__(self) -> str:
        """String representation"""
        status = "initialized" if self._initialized else "not initialized"
        pipelines = f"pipelines={list(self.pipelines.keys())}" if self._initialized else ""

View on GitHub (pinned to 848b054e4f)

Solutions

  1. Use one of the names listed in the error's 'Available pipelines' message
  2. Check service.pipelines.keys() before calling to confirm the exact name
  3. Register a custom pipeline first if you intend to use one: service.pipelines['custom'] = my_pipeline
  4. Fix casing/underscores to match the exact registered key

Example fix

# before
await service.generate_video(pipeline="text_to_vid")
# after
await service.generate_video(pipeline="text2video")
Defensive patterns

Strategy: validation

Validate before calling

if pipeline_name not in service.pipelines:
    raise ValueError(f"{pipeline_name!r} not in {list(service.pipelines)}")

Type guard

def is_valid_pipeline(service, name: str) -> bool:
    return isinstance(name, str) and name in service.pipelines

Try / catch

try:
    video = await service.generate_video(pipeline=name)
except ValueError as e:
    logger.error("pipeline lookup failed: %s", e)
    raise

Prevention

When it happens

Trigger: service.generate_video(pipeline='<typo>', ...) where pipeline is not a key in self.pipelines (e.g. 'image2video' vs 'image_to_video').

Common situations: Typos in pipeline names; calling a custom pipeline before it was registered; version change removed/renamed a pipeline; case mismatch ('Text2Video' vs 'text2video').

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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