python
config_error
ai_generated
true
ERROR: setuptools.errors.PackageNotFoundError: The 'data_files' pattern 'config/*.ini' did not match any files
ID: python/setuptools-extra-files-not-found
80%Fix Rate
85%Confidence
0Evidence
2025-01-20First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
Root Cause
The specified glob pattern in setup.cfg or setup.py does not find any files in the package.
generic中文
setup.cfg 或 setup.py 中指定的 glob 模式在包中未找到任何文件。
Workarounds
-
95% success Correct the path to the actual files
Ensure the config directory exists and contains .ini files. Example: mkdir config; touch config/settings.ini
-
90% success Use package_data instead of data_files
In setup.cfg: [options.package_data] * = config/*.ini
Dead Ends
Common approaches that don't work:
-
Changing the pattern to '*.ini' without a directory
60% fail
May match unintended files; also doesn't solve the path issue.
-
Removing the data_files configuration entirely
80% fail
Necessary files will be missing from the distribution.