{"record":{"id":"d83f577d9db82ea4","repo":"apache/beam","slug":"provided-prism-location-url-is-not-an-apache-beam-github","errorCode":null,"errorMessage":"Provided --prism_location URL is not an Apache Beam Github Release page URL or download URL: %s","messagePattern":"Provided --prism_location URL is not an Apache Beam Github Release page URL or download URL: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/portability/prism_runner.py","lineNumber":380,"sourceCode":"      # the path with the following steps.\n      pass\n\n    # Check if the path is a URL.\n    url = urllib.parse.urlparse(path)\n    if not url.scheme:\n      raise ValueError(\n          'Unable to parse binary URL \"%s\". If using a full URL, make '\n          'sure the scheme is specified. If using a local file xpath, '\n          'make sure the file exists; you may have to first build prism '\n          'using `go build `.' % (path))\n\n    # We have a URL, see if we need to construct a valid file name.\n    if path.startswith(GITHUB_DOWNLOAD_PREFIX):\n      # If this URL starts with the download prefix, let it through.\n      return path\n    # The only other valid option is a github release page.\n    if not path.startswith(GITHUB_TAG_PREFIX):\n      raise ValueError(\n          'Provided --prism_location URL is not an Apache Beam Github '\n          'Release page URL or download URL: %s' % (path))\n    # Get the root tag for this URL\n    root_tag = os.path.basename(os.path.normpath(path))\n    return PrismJobServer._construct_download_url(\n        version, root_tag, platform.system(), platform.machine())\n\n  @staticmethod\n  def _install_from_source(version):\n    \"\"\"Builds and installs Prism from a Go source package.\n    It first tries the local module, then falls back to @latest.\n    \"\"\"\n    # This is a development version! Assume Go is installed.\n    # Set the install directory to the cache location.\n    envdict = {**os.environ, \"GOBIN\": PrismJobServer.BIN_CACHE}\n    PRISMPKG = \"github.com/apache/beam/sdks/v2/go/cmd/prism\"\n\n    _LOGGER.info(","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/prism_runner.py#L362-L398","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\n--prism_location=https://internal-mirror.example.com/prism\n// after\n--prism_location=https://github.com/apache/beam/releases/tag/prism-v2.61.0","handlingStrategy":"validation","validationCode":"GITHUB_TAG_PREFIX = 'https://github.com/apache/beam/releases/tag/'\nGITHUB_DOWNLOAD_PREFIX = 'https://github.com/apache/beam/releases/download/'\nloc = options.prism_location\nif loc and loc.startswith('http') and not (\n        loc.startswith(GITHUB_DOWNLOAD_PREFIX) or loc.startswith(GITHUB_TAG_PREFIX)):\n    raise ValueError(f'--prism_location must be a Beam GitHub release URL or local path: {loc}')","typeGuard":"def is_valid_prism_location(loc: str) -> bool:\n    return not loc.startswith('http') or loc.startswith(GITHUB_TAG_PREFIX) or loc.startswith(GITHUB_DOWNLOAD_PREFIX)","tryCatchPattern":"try:\n    server = PrismJobServer(options)\nexcept ValueError as e:\n    if 'not an Apache Beam Github' in str(e):\n        logger.warning('Falling back to auto-managed prism; fix --prism_location')\n        options.prism_location = None\n        server = PrismJobServer(options)\n    else:\n        raise","preventionTips":["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"],"tags":["apache-beam","prism","cli-argument","url-validation"],"backgroundTag":"invalid-url-format","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}