python
config_error
ai_generated
true
error: package data file 'data/config.yaml' not found
ID: python/setuptools-package-data-not-included
80%Fix Rate
83%Confidence
0Evidence
2024-11-15First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 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
-
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() -
70% success Use setuptools_scm to auto-include
pip install setuptools_scm and configure accordingly
Dead Ends
Common approaches that don't work:
-
Adding the file to the wrong directory
50% fail
Path mismatch.
-
Using MANIFEST.in incorrectly
40% fail
May not include data files in wheel.