Skip to content

[BUG] "dash-hooks" is an invalid group name in python and so plugins using it don't install #3272

Closed
@michaelbabyn

Description

@michaelbabyn

Initially reported in this community post https://community.plotly.com/t/plugin-cannot-be-installed-with-pip/91307

Describe the bug

follow the plugin guide in dash docs and set entry_points={"dash-hooks": ["callback_error_plugin = callback_error_plugin"]}, in the setup.py file so that the hooks gets added to dash apps automatically.

Trying to pip install the resulting package whl results in ValueError: (‘Invalid group name’, ‘dash-hooks’) because hyphens aren't allowed from https://packaging.python.org/en/latest/specifications/entry-points/

Group names must be one or more groups of letters, numbers and underscores, separated by dots (regex ^\w+(.\w+)*$).

replacing the hyphen in this check in dash

dash/dash/_hooks.py

Lines 252 to 253 in 700b706

# Look for setup.py entry points named `dash-hooks`
if entry.group != "dash-hooks":
with an underscore and then modifying the setup.py file of my plugin accordingly fixed the issue for me though

cc @T4rk1n @LiamConnors

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions