apache/beam · error · ValueError

Found more than one renderer for option: %s

Error message

Found more than one renderer for option: %s

What it means

get_renderer() raises this ValueError when more than one PipelineGraphRenderer subclass claims the same option(). This is an internal registration invariant violation: option strings are expected to uniquely identify a renderer.

Source

Thrown at sdks/python/apache_beam/runners/interactive/display/pipeline_graph_renderer.py:126

      exists = subprocess.call(['where', 'dot.exe']) == 0
    else:
      exists = subprocess.call(['which', 'dot']) == 0

    if exists:
      option = 'graph'
    else:
      option = 'text'

  renderer = [
      r for r in PipelineGraphRenderer.get_all_subclasses()
      if option == r.option()
  ]
  if len(renderer) == 0:
    raise ValueError()
  elif len(renderer) == 1:
    return renderer[0]()
  else:
    raise ValueError('Found more than one renderer for option: %s', option)

View on GitHub (pinned to 12126d8942)

Solutions

  1. Change the duplicate option() string in your custom renderer subclass to a unique value.
  2. Remove or rename the redundant renderer subclass so only one claims each option.
  3. Audit all PipelineGraphRenderer subclasses (get_all_subclasses) and their option() values for collisions.
  4. Check recently installed Beam extensions/plugins that may register conflicting renderers.

Example fix

// before
class MyRenderer(PipelineGraphRenderer):
  @staticmethod
  def option():
    return 'graphviz'  # collides with built-in
// after
class MyRenderer(PipelineGraphRenderer):
  @staticmethod
  def option():
    return 'my-graphviz'
Defensive patterns

Strategy: validation

Validate before calling

from collections import Counter
from apache_beam.runners.interactive.display.pipeline_graph_renderer import PipelineGraphRenderer
options = [r.option() for r in PipelineGraphRenderer.get_all_subclasses()]
dupes = [o for o, c in Counter(options).items() if c > 1]
assert not dupes, f'Duplicate renderer options: {dupes}'

Try / catch

try:
    renderer = get_renderer(option)
except ValueError as e:
    if 'more than one renderer' in str(e) or 'Found more than one' in str(e):
        renderer = fix_duplicate_registration(option)
    else:
        raise

Prevention

When it happens

Trigger: Defining a custom renderer subclass whose option() returns a string already used by a built-in renderer (e.g. duplicate 'graphviz'), then calling get_renderer(option) which finds two matches.

Common situations: A user copies a built-in renderer class to customize it but forgets to change option(); a third-party extension registers a conflicting option; Beam upgrade introduces a renderer colliding with a locally defined one.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/7e60ec5859df7e49. Report an issue: GitHub.