{"record":{"id":"d52a37d1f4df95c1","repo":"apache/beam","slug":"could-not-find-the-provided-transforms-config-source","errorCode":null,"errorMessage":"Could not find the provided transforms config source: {transforms_config_source}","messagePattern":"Could not find the provided transforms config source: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/gen_xlang_wrappers.py","lineNumber":391,"sourceCode":"    input_expansion_services,\n    transforms_config_source):\n  # Cleanup first if requested. This is needed to remove outdated wrappers.\n  if cleanup:\n    delete_generated_files(PY_WRAPPER_OUTPUT_DIR)\n\n  # This step requires the expansion service.\n  # Only generate a transforms config file if none are provided\n  if not transforms_config_source:\n    output_transforms_config = os.path.join(\n        PROJECT_ROOT, 'sdks', 'standard_external_transforms.yaml')\n    generate_transforms_config(\n        input_services=input_expansion_services,\n        output_file=output_transforms_config)\n\n    transforms_config_source = output_transforms_config\n  else:\n    if not os.path.exists(transforms_config_source):\n      raise RuntimeError(\n          \"Could not find the provided transforms config \"\n          f\"source: {transforms_config_source}\")\n\n  if generate_config_only:\n    return\n\n  wrappers_grouped_by_destination = get_wrappers_from_transform_configs(\n      transforms_config_source)\n\n  write_wrappers_to_destinations(wrappers_grouped_by_destination)\n\n\nif __name__ == '__main__':\n  parser = argparse.ArgumentParser()\n  parser.add_argument(\n      '--cleanup',\n      dest='cleanup',\n      action='store_true',","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/gen_xlang_wrappers.py#L373-L409","documentation":"gen_xlang_wrappers.py generates Python wrapper classes for cross-language transforms from a YAML transforms config. When the config source path was supplied by the caller (rather than generated internally), the script checks os.path.exists() on it and raises RuntimeError if the file is absent, because it cannot proceed without the transform definitions.","triggerScenarios":"Running gen_xlang_wrappers.py (or calling run_script) with a --transforms_config_source path that does not exist on disk, e.g. a typo'd path, a file deleted before the run, or a config only present after a prior generation step that never ran.","commonSituations":"Developers wiring xlang wrapper generation into build scripts point at a YAML file in a different repo checkout or a path relative to the wrong cwd; CI caches miss the config file; Beam SDK version change renames standard_external_transforms.yaml.","solutions":["Verify the path passed as transforms_config_source exists (os.path.exists) before invoking the script","If you intended auto-generation, omit the config source so the script generates it into output_transforms_config","Run the generation from the repository root so relative paths resolve correctly","Check out/pull the file (e.g. standard_external_transforms.yaml) if it lives in another directory of the repo"],"exampleFix":"# before\nsubprocess.run(['python', 'gen_xlang_wrappers.py', '--transforms_config_source', 'standard_external_transforms.yaml'])\n# after\nimport os\ncfg = os.path.join(sdk_dir, 'standard_external_transforms.yaml')\nassert os.path.exists(cfg), f'missing transforms config: {cfg}'\nsubprocess.run(['python', 'gen_xlang_wrappers.py', '--transforms_config_source', cfg])","handlingStrategy":"validation","validationCode":"import os\nif not os.path.exists(transforms_config_source):\n    raise FileNotFoundError(f'transforms config missing: {transforms_config_source}')","typeGuard":"def is_valid_config_source(path: str) -> bool:\n    return isinstance(path, str) and os.path.isfile(path)","tryCatchPattern":null,"preventionTips":["Always resolve the config path relative to the SDK root, not cwd","Check os.path.exists before invoking the generator","Generate the config first if you don't have one, instead of passing a path"],"tags":["python","file-not-found","build","xlang"],"backgroundTag":"file-not-found","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"}