apache/beam · error · ValueError
Provided --prism_location URL is not an Apache Beam Github…
Error message
Provided --prism_location URL is not an Apache Beam Github Release page URL or download URL: %s
What it means
prism_runner resolves the --prism_location option into a downloadable Prism binary URL. If the value is a URL but neither a GitHub release download URL (starting with the download prefix) nor a GitHub release tag page URL (starting with the tag prefix), the library cannot map it to a binary and raises ValueError. It only accepts URLs pointing at the Apache Beam GitHub releases.
Solutions
- Use the official GitHub release page URL for a specific tag, e.g. https://github.com/apache/beam/releases/tag/prism-vX.Y.Z
- Or use the direct download URL starting with the GitHub download prefix
- Or point --prism_location at a local prism binary path instead of a URL
- Or drop --prism_location entirely and let Beam download/build Prism automatically
Example fix
// before --prism_location=https://internal-mirror.example.com/prism // after --prism_location=https://github.com/apache/beam/releases/tag/prism-v2.61.0
Defensive patterns
Strategy: validation
Validate before calling
GITHUB_TAG_PREFIX = 'https://github.com/apache/beam/releases/tag/'
GITHUB_DOWNLOAD_PREFIX = 'https://github.com/apache/beam/releases/download/'
loc = options.prism_location
if loc and loc.startswith('http') and not (
loc.startswith(GITHUB_DOWNLOAD_PREFIX) or loc.startswith(GITHUB_TAG_PREFIX)):
raise ValueError(f'--prism_location must be a Beam GitHub release URL or local path: {loc}') Type guard
def is_valid_prism_location(loc: str) -> bool:
return not loc.startswith('http') or loc.startswith(GITHUB_TAG_PREFIX) or loc.startswith(GITHUB_DOWNLOAD_PREFIX) Try / catch
try:
server = PrismJobServer(options)
except ValueError as e:
if 'not an Apache Beam Github' in str(e):
logger.warning('Falling back to auto-managed prism; fix --prism_location')
options.prism_location = None
server = PrismJobServer(options)
else:
raise Prevention
- Only pass official github.com/apache/beam/releases URLs or local file paths
- Validate the flag value in your launcher script before invoking Beam
- Copy release URLs directly from the GitHub releases page rather than retyping them
When it happens
Trigger: Calling Beam with --prism_location set to a URL that starts with neither GITHUB_DOWNLOAD_PREFIX nor GITHUB_TAG_PREFIX (e.g. a personal mirror, an S3/HTTP link to a prism binary, or a typo'd GitHub URL). Raised in _resolve_from_location_override, invoked from _resolve_source_path when a location override is a URL.
Common situations: Pointing --prism_location at an internal artifact mirror or a direct binary URL from a non-GitHub host; pasting a GitHub 'releases' root page instead of a tag page; hand-editing the tag URL and breaking its prefix.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- Azure Blob Storage path must be in the form…
- bucket must not be empty
- error connecting to job server at
- Unable to install a local of Prism
- Unknown or inapplicable phase for pre_optimize
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/d83f577d9db82ea4.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/runners/portability/prism_runner.py:380
# the path with the following steps.
pass
# Check if the path is a URL.
url = urllib.parse.urlparse(path)
if not url.scheme:
raise ValueError(
'Unable to parse binary URL "%s". If using a full URL, make '
'sure the scheme is specified. If using a local file xpath, '
'make sure the file exists; you may have to first build prism '
'using `go build `.' % (path))
# We have a URL, see if we need to construct a valid file name.
if path.startswith(GITHUB_DOWNLOAD_PREFIX):
# If this URL starts with the download prefix, let it through.
return path
# The only other valid option is a github release page.
if not path.startswith(GITHUB_TAG_PREFIX):
raise ValueError(
'Provided --prism_location URL is not an Apache Beam Github '
'Release page URL or download URL: %s' % (path))
# Get the root tag for this URL
root_tag = os.path.basename(os.path.normpath(path))
return PrismJobServer._construct_download_url(
version, root_tag, platform.system(), platform.machine())
@staticmethod
def _install_from_source(version):
"""Builds and installs Prism from a Go source package.
It first tries the local module, then falls back to @latest.
"""
# This is a development version! Assume Go is installed.
# Set the install directory to the cache location.
envdict = {**os.environ, "GOBIN": PrismJobServer.BIN_CACHE}
PRISMPKG = "github.com/apache/beam/sdks/v2/go/cmd/prism"
_LOGGER.info(View on GitHub (pinned to 12126d8942)