{"record":{"id":"e8ec34dfce4648d9","repo":"apache/beam","slug":"could-not-locate-yaml-docs-source-directory-docs-src","errorCode":null,"errorMessage":"Could not locate yaml docs source directory {docs_src}. Skipping copying tests from docs.","messagePattern":"Could not locate yaml docs source directory (.+?)\\. Skipping copying tests from docs\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/python/setup.py","lineNumber":275,"sourceCode":"    print(out.stdout)\n  except subprocess.CalledProcessError as err:\n    raise RuntimeError('Could not generate protos due to error: %s', err.stderr)\n\n\ndef copy_tests_from_docs():\n  python_root = os.path.abspath(os.path.dirname(__file__))\n  docs_src = os.path.normpath(\n      os.path.join(\n          python_root, '../../website/www/site/content/en/documentation/sdks'))\n  docs_dest = os.path.normpath(\n      os.path.join(python_root, 'apache_beam/yaml/docs'))\n  if os.path.exists(docs_src):\n    shutil.rmtree(docs_dest, ignore_errors=True)\n    os.mkdir(docs_dest)\n    for path in glob.glob(os.path.join(docs_src, 'yaml*.md')):\n      shutil.copy(path, docs_dest)\n  else:\n    warnings.warn(\n        f'Could not locate yaml docs source directory {docs_src}. '\n        f'Skipping copying tests from docs.')\n\n\ndef generate_external_transform_wrappers():\n  try:\n    sdk_dir = os.path.abspath(os.path.dirname(__file__))\n    script_exists = os.path.exists(\n        os.path.join(sdk_dir, 'gen_xlang_wrappers.py'))\n    config_exists = os.path.exists(\n        os.path.join(\n            os.path.dirname(sdk_dir), 'standard_external_transforms.yaml'))\n    # we need both the script and the standard transforms config file.\n    # at build time, we don't have access to apache_beam to discover and\n    # retrieve external transforms, so the config file has to already exist\n    if not script_exists or not config_exists:\n      generated_transforms_dir = os.path.join(\n          sdk_dir, 'apache_beam', 'transforms', 'xlang')","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/setup.py#L257-L293","documentation":"Beam's copy_tests_from_docs helper warns and does nothing when the YAML docs source directory does not exist. It normally copies yaml*.md docs files into a destination directory for generated doc tests; a missing source dir means those doc-derived tests are not copied.","triggerScenarios":"Running the copy_tests_from_docs setup target (or the build step that calls it) when the expected docs source directory (e.g. the beam website yaml docs path) is absent from the checkout.","commonSituations":"Shallow/partial clones that exclude the website docs; running from a Beam source tree without the docs submodule; CI checkouts that skip website content.","solutions":["Clone/fetch the full Beam repository including the docs/website yaml sources, then re-run.","Set or correct the docs source path so it points at the directory containing yaml*.md files.","If doc tests are not needed, treat this warning as safe to ignore."],"exampleFix":"// before\n$ python setup.py copy_tests_from_docs   # docs dir missing\n// after\n$ git clone --recurse-submodules https://github.com/apache/beam.git  # or fetch website yaml docs\n$ python setup.py copy_tests_from_docs","handlingStrategy":"validation","validationCode":"import os\nif not os.path.isdir(docs_src):\n    print(f'docs source {docs_src} missing; fetch the beam website yaml docs first')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clone the full Beam repo (including website/docs sources) before running doc-test setup steps","Verify the yaml*.md docs directory exists in CI before invoking the target","Skip the target explicitly when doc tests are not needed"],"tags":["python","docs","build","missing-directory"],"backgroundTag":"directory-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"}