From b840c94ebc1d995783ab81ae2c22503515e00dfd Mon Sep 17 00:00:00 2001 From: Eric Duminil <eric.duminil@gmail.com> Date: Mon, 13 Jan 2025 16:46:33 +0100 Subject: [PATCH] Pyperclip might fail on some systems --- get_coordinates_by_zipcode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/get_coordinates_by_zipcode.py b/get_coordinates_by_zipcode.py index b193974..7794d5f 100644 --- a/get_coordinates_by_zipcode.py +++ b/get_coordinates_by_zipcode.py @@ -103,7 +103,8 @@ def get_coordinates_by_zipcode(plz_patterns: list[str], precision: float = PRECI import pyperclip pyperclip.copy(wkt_polygon) print("WKT Polygon copied to clipboard.") - except ModuleNotFoundError: + except (ModuleNotFoundError, RuntimeError): + # Pyperclip is either not installed, or lacks a dependency pass print() -- GitLab