Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork93
Description
Reposting#340 (comment) as an issue.
I'm observingimportlib_metadata.packages_distributions() throw the following error:
File"/opt/mlflow/mlflow/utils/requirements_utils.py",line129,in<module>_MODULE_TO_PACKAGES=importlib_metadata.packages_distributions()File"/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py",line1016,inpackages_distributionsforpkgin_top_level_declared(dist)or_top_level_inferred(dist):File"/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py",line1026,in_top_level_inferredreturn {
https://github.com/mlflow/mlflow/runs/3428616955#step:5:7078
It looks like the line 1028 in_top_level_inferred tries to iterate ondist.files that can be None and then throws the error above:
importlib_metadata/importlib_metadata/__init__.py
Lines 1025 to 1030 in15df009
| def_top_level_inferred(dist): | |
| return { | |
| f.parts[0]iflen(f.parts)>1elsef.with_suffix('').name | |
| forfindist.files | |
| iff.suffix==".py" | |
| } |
https://docs.python.org/3/library/importlib.metadata.html#distribution-files says:
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.