-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
triageNew bug, unverifiedNew bug, unverified
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
3.0.1
Problem description
I added duplicate enum keys by accident:
py::native_enum<StandardIconType>(m, "StandardIconType", "enum.IntEnum")
.value("TitleBarMenuButton", TitleBarMenuButton)
.value("TitleBarMenuButton", TitleBarMenuButton)
…
Now i get lots of warnings like:
15:36:31 [warn:albert.python] ImportError: initialization failed
At:
/Users/manuel/Library/Application Support/albert/python/plugins/color/__init__.py(17): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
15:36:31 [debg:albert] Plugin python.color unloaded. ImportError: initialization failed
At:
/Users/manuel/Library/Application Support/albert/python/plugins/color/__init__.py(17): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
15:36:32 [warn:albert.python] ImportError: generic_type: type "PluginInstance" is already registered!
At:
/Users/manuel/Library/Application Support/albert/python/plugins/firefox/__init__.py(9): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
15:36:32 [debg:albert] Plugin python.firefox unloaded. ImportError: generic_type: type "PluginInstance" is already registered!
At:
/Users/manuel/Library/Application Support/albert/python/plugins/firefox/__init__.py(9): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
15:36:32 [warn:albert.python] ImportError: generic_type: type "MatchConfig" is already registered!
At:
/Users/manuel/Library/Application Support/albert/python/plugins/jetbrains_projects/__init__.py(43): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
15:36:32 [debg:albert] Plugin python.jetbrains_projects unloaded. ImportError: generic_type: type "MatchConfig" is already registered!
At:
/Users/manuel/Library/Application Support/albert/python/plugins/jetbrains_projects/__init__.py(43): <module>
<frozen importlib._bootstrap>(488): _call_with_frames_removed
<frozen importlib._bootstrap_external>(1026): exec_module
Basically for each import of the embedded module I get weird is already registered! errros for types that are not part of the actual problem. It took me quite a while to find the actual problem statement (the duplicate enum above).
I would be useful if the errord could indicate the actually duplicate registration of the enum key instead of random other symbols.
Reproducible example code
See above
Is this a regression? Put the last known working version here if it is.
Not a regression
Metadata
Metadata
Assignees
Labels
triageNew bug, unverifiedNew bug, unverified