diff --git a/src/poetry/repositories/installed_repository.py b/src/poetry/repositories/installed_repository.py index 47130090f40..799a9fce610 100644 --- a/src/poetry/repositories/installed_repository.py +++ b/src/poetry/repositories/installed_repository.py @@ -233,6 +233,9 @@ def load(cls, env: Env, with_dependencies: bool = False) -> InstalledRepository: metadata.distributions(path=[entry]), key=lambda d: str(d._path), ): + # fix for https://github.com/python-poetry/poetry/issues/3628 + if distribution.metadata["name"] is None: + continue name = canonicalize_name(distribution.metadata["name"]) if name in seen: