python config_error ai_generated true

error: package data file 'data/config.yaml' not found

ID: python/setuptools-package-data-not-included

Also available as: JSON · Markdown · 中文
80%Fix Rate
83%Confidence
0Evidence
2024-11-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.9 active — — —
3.10 active — — —

Root Cause

The package data file is missing from the source tree or not specified in setup.py.

generic

中文

包数据文件在源代码树中缺失,或未在 setup.py 中指定。

Workarounds

  1. 90% success Create the missing file or adjust setup.py
    Ensure file exists and add include_package_data=True and package_data={'': ['data/*.yaml']} in setup()
  2. 70% success Use setuptools_scm to auto-include
    pip install setuptools_scm and configure accordingly

Dead Ends

Common approaches that don't work:

  1. Adding the file to the wrong directory 50% fail

    Path mismatch.

  2. Using MANIFEST.in incorrectly 40% fail

    May not include data files in wheel.