From 7e1b8608060bd7e92f1bfa495e1c3c5eafa6bb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Mee=C3=9Fen?= <52298176+fmssn@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:45:45 +0200 Subject: [PATCH] Catch req.link = None req.link is of type InstallRequirements which can be None. Return False (requirement not met) if this is the case. --- pipenv/environment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipenv/environment.py b/pipenv/environment.py index 26b42e66..3f2a70cc 100644 --- a/pipenv/environment.py +++ b/pipenv/environment.py @@ -769,6 +769,8 @@ class Environment: None, ) if match is not None: + if req.link is None: + return False if req.editable and req.link and req.link.is_file: requested_path = req.link.file_path if os.path.exists(requested_path):