From 30560fb4ef78077a0b508e4cae527703cf41e417 Mon Sep 17 00:00:00 2001 From: cctv130 <133784576+cctv130@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:44:56 +0800 Subject: [PATCH] fixed 'PathDistribution' object has no attribute 'name' --- src/debugpy/common/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debugpy/common/log.py b/src/debugpy/common/log.py index 099e93c71..c0787b499 100644 --- a/src/debugpy/common/log.py +++ b/src/debugpy/common/log.py @@ -359,7 +359,7 @@ def report_paths(get_paths, label=None): report("Installed packages:\n") try: for pkg in importlib_metadata.distributions(): - report(" {0}=={1}\n", pkg.name, pkg.version) + report(" {0}=={1}\n", pkg.metadata['Name'], pkg.version) except Exception: # pragma: no cover swallow_exception( "Error while enumerating installed packages.", level="info"