{"record":{"id":"19c848ed74ef140e","repo":"apache/beam","slug":"unable-to-parse-binary-url-s-if-using-a-full-url-make-sure","errorCode":null,"errorMessage":"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 `.","messagePattern":"Unable to parse binary URL \"(.+?)\"\\. 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 `\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/portability/prism_runner.py","lineNumber":368,"sourceCode":"    \"\"\"Handles the case where --prism_location is explicitly set.\"\"\"\n    # The path is overridden, check various cases.\n    if os.path.exists(path):\n      # The path is local and exists, use directly.\n      return path\n\n    try:\n      if FileSystems.exists(path):\n        # The path is in one of the supported filesystems.\n        return path\n    except ValueError:\n      # If there is a value error raised by Filesystems, try to resolve\n      # 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())","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/prism_runner.py#L350-L386","documentation":"_resolve_from_location_override interprets the --prism_location value as either a URL or a local file path. When urllib.parse finds no scheme, it treats the value as a local path; if parsing/lookup fails this ValueError is raised asking you to either give a scheme-bearing URL or a valid existing file path.","triggerScenarios":"Passing --prism_location with a URL missing its scheme (e.g. 'github.com/.../file.zip' or '//host/path') or a typo'd/nonexistent local path to a prism binary.","commonSituations":"Omitting 'https://' when pasting a release URL; using 'file://' incorrectly or pointing at a path that does not exist yet before building prism with `go build`.","solutions":["Prepend the scheme to the URL: --prism_location=https://github.com/... .","If it is a local binary, verify the file exists (ls) and pass the full path without a scheme.","Build prism first with `go build` so the referenced local path exists."],"exampleFix":"// before\n--prism_location=github.com/apache/beam/releases/download/v2.66.0/prism.zip\n// after\n--prism_location=https://github.com/apache/beam/releases/download/v2.66.0/prism.zip","handlingStrategy":"validation","validationCode":"from urllib.parse import urlparse\nimport os\npath = prism_location\nu = urlparse(path)\nif not u.scheme and not os.path.isfile(path):\n    raise SystemExit(f'--prism_location {path!r}: add a URL scheme or point at an existing prism binary')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include https:// in download URLs passed to --prism_location.","For local binaries, pass an absolute, existing file path with no scheme.","Build prism with `go build` before referencing a local path."],"tags":["url","configuration","prism"],"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"}