Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeError: 'NoneType' object is not iterable in_top_level_inferred #344

Closed
@harupy

Description

@harupy

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp