python
config_error
ai_generated
true
ValueError: EntryPoint.parse - invalid entry point in entry-points generated file: 'console_scripts = foo'
ID: python/setuptools-entry-points-malformed
80%Fix Rate
85%Confidence
0Evidence
2024-07-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
A pyproject.toml or setup.cfg declares an entry point without the required 'module:callable' format, e.g. 'foo = mypkg' instead of 'foo = mypkg.cli:main'.
generic中文
pyproject.toml 或 setup.cfg 声明的入口点缺少必需的 'module:callable' 格式,例如 'foo = mypkg' 而非 'foo = mypkg.cli:main'。
Workarounds
-
97% success
[project.scripts] foo = "mypkg.cli:main" # or for a module entry foo = "mypkg.cli:__main__"
-
90% success
python - <<'PY' from importlib.metadata import EntryPoint EntryPoint(name='foo', value='mypkg.cli:main', group='console_scripts') print('ok') PY
Dead Ends
Common approaches that don't work:
-
90% fail
An empty callable is still invalid; the parser requires a non-empty name after the colon.
-
60% fail
Breaks the CLI the project intends to expose and downstream scripts that call it.