diff --git a/get_coordinates_by_zipcode.py b/get_coordinates_by_zipcode.py index b193974f0e82700479bb766cd0cde0e486763bd9..7794d5fb439f59ed0fb10a9e5bd5d70334ee0a48 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()