Closed
Description
Reposting #340 (comment) as an issue.
I'm observing importlib_metadata.packages_distributions()
throw the following error:
File "/opt/mlflow/mlflow/utils/requirements_utils.py", line 129, in <module>
_MODULE_TO_PACKAGES = importlib_metadata.packages_distributions()
File "/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1016, in packages_distributions
for pkg in _top_level_declared(dist) or _top_level_inferred(dist):
File "/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1026, in _top_level_inferred
return {
It looks like the line 1028 in _top_level_inferred
tries to iterate on dist.files
that can be None and then throws the error above:
importlib_metadata/importlib_metadata/__init__.py
Lines 1025 to 1030 in 15df009
In the case where the metadata file listing files (RECORD or SOURCES.txt) is missing, files() will return None. The caller may wish to wrap calls to files() in always_iterable or otherwise guard against this condition if the target distribution is not known to have the metadata present.
Metadata
Metadata
Assignees
Labels
No labels