entry_points() fails with configparser.DuplicateOptionError
I get the following error when calling importlib_metadata.entry_points()
:
>>> importlib_metadata.entry_points()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 444, in entry_points
ordered = sorted(eps, key=by_group)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 442, in <genexpr>
dist.entry_points for dist in distributions())
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 226, in entry_points
return EntryPoint._from_text(self.read_text('entry_points.txt'))
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 109, in _from_text
config.read_string(text)
File "/opt/conda/envs/testenv/lib/python3.7/configparser.py", line 722, in read_string
self.read_file(sfile, source)
File "/opt/conda/envs/testenv/lib/python3.7/configparser.py", line 717, in read_file
self._read(f, source)
File "/opt/conda/envs/testenv/lib/python3.7/configparser.py", line 1092, in _read
fpname, lineno)
configparser.DuplicateOptionError: While reading from '<string>' [line 16]: option 'bliss' in section 'console_scripts' already exists
My setup.py
for package bliss
contains a console-scripts
entry point with multiple scripts, but none of
them is duplicated...
How can I debug this ? What can be the origin of this error ?
Otherwise I can workaround (or hide) the problem by adding strict=False
in the ConfigParser
constructor of importlib-metadata.
Edited by Matias G