apache/beam · error · ValueError

Operating System " " unsupported for constructing a Prism…

Error message

Operating System "%s" unsupported for constructing a Prism release binary URL.

What it means

Prism release binaries are only published for linux, windows, and darwin (matching Go build targets). _construct_download_url raises this ValueError when platform.system() returns anything else, because no release URL can be constructed for that OS.

Solutions

  1. Build prism from source with `go build` and pass --prism_location=/path/to/prism.
  2. Run the pipeline on linux/macos/windows, or inside a linux container.
  3. Use an already-running prism job server via --job_endpoint.

Example fix

// before (FreeBSD, no override)
--runner=PrismRunner
// after
--runner=PrismRunner --prism_location=/opt/prism/prism
Defensive patterns

Strategy: validation

Validate before calling

import platform, sys
if platform.system().lower() not in ('linux', 'windows', 'darwin') and not prism_location_override:
    sys.exit('Prism release binaries unavailable for this OS; build prism and set --prism_location')

Prevention

When it happens

Trigger: Running PrismRunner (without a local prism binary or --prism_location override) on an OS whose platform.system() is not linux/windows/darwin, e.g. FreeBSD or Cygwin.

Common situations: Developers on BSD variants or unusual platforms; containers reporting an unexpected system name; attempting release-download on unsupported systems.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at sdks/python/apache_beam/runners/portability/prism_runner.py:319

          raise RuntimeError(
              'Unable to fetch remote prism binary at %s: %s' % (url, e))
        # If we download a new prism, then we should always use it but not
        # the cached one.
        ignore_cache = True
    return cached_file, ignore_cache

  @staticmethod
  def _construct_download_url(
      version: str, root_tag: str, sys: str, mach: str) -> str:
    """Construct the prism download URL with the appropriate release tag.
    This maps operating systems and machine architectures to the compatible
    and canonical names used by the Go build targets.

    platform.system() provides compatible listings, so we need to filter out
    the unsupported versions."""
    opsys = sys.lower()
    if opsys not in ['linux', 'windows', 'darwin']:
      raise ValueError(
          'Operating System "%s" unsupported for constructing a Prism release '
          'binary URL.' % (opsys))

    # platform.machine() will vary by system, but many names are compatible.
    arch = mach.lower()
    if arch in ['amd64', 'x86_64', 'x86-64', 'x64']:
      arch = 'amd64'
    if arch in ['arm64', 'aarch64_be', 'aarch64', 'armv8b', 'armv8l']:
      arch = 'arm64'

    if arch not in ['amd64', 'arm64']:
      raise ValueError(
          'Machine architecture "%s" unsupported for constructing a Prism '
          'release binary URL.' % (opsys))

    # Some special handling is needed when creating url for release candidates.
    # For example, v2.66.0rc2 should have the following url
    # https://github.com/apache/beam/releases/download/v2.66.0-RC2/apache_beam-v2.66.0-prism-xxx-yyy.zip

View on GitHub (pinned to 12126d8942)