diff options
-rw-r--r-- | fietsboek/hittekaart.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fietsboek/hittekaart.py b/fietsboek/hittekaart.py index 06319a4..25d4864 100644 --- a/fietsboek/hittekaart.py +++ b/fietsboek/hittekaart.py @@ -10,7 +10,10 @@ import tempfile from pathlib import Path from typing import Optional -import hittekaart_py +try: + import hittekaart_py +except ImportError: + hittekaart_py = None from sqlalchemy import select from sqlalchemy.orm import aliased from sqlalchemy.orm.session import Session @@ -56,6 +59,9 @@ def generate( :param threads: Number of threads that ``hittekaart`` should use. Defaults to 0, which uses all available cores. """ + if hittekaart_py is None: + raise RuntimeError("hittekaart not available") + if not input_files: return |