python
config_error
ai_generated
true
error: 'entry_points' must be a dictionary
ID: python/setuptools-entry-points-format
80%Fix Rate
85%Confidence
0Evidence
2025-06-08First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
Root Cause
The 'entry_points' argument in setup() was provided as a list or string instead of a dict.
generic中文
setup()中的'entry_points'参数被提供为列表或字符串,而不是字典。
Workarounds
-
95% success Use correct dict format with group keys
setup( entry_points={ 'console_scripts': ['mycommand=mymodule:main'], 'myplugin': ['myplugin=mymodule:plugin'] } ) -
90% success Use setup.cfg for entry points
# setup.cfg [options.entry_points] console_scripts = mycommand = mymodule:main
Dead Ends
Common approaches that don't work:
-
Passing a list of strings
90% fail
Setuptools expects nested dict structure; list causes parsing error.
-
Omitting entry_points
60% fail
Console scripts or plugins will not be registered.