diff --git a/preprocess_cancellation.py b/preprocess_cancellation.py index 5c48021..1382dbc 100644 --- a/preprocess_cancellation.py +++ b/preprocess_cancellation.py @@ -5,6 +5,7 @@ import logging import time import pathlib +import platform import re import shutil import statistics @@ -16,11 +17,13 @@ logging.basicConfig(stream=sys.stderr, level=logging.INFO) logger = logging.getLogger("prepropress_cancellation") +shapely = None try: import shapely.geometry except ImportError: logger.info("Shapely not found, complex hulls disabled") - shapely = None +except OSError: + logger.exception("Failed to import shapely. Are you missing libgeos?") HEADER_MARKER = "; Pre-Processed for Cancel-Object support\n" @@ -501,4 +504,4 @@ def _main(): sys.exit(exitcode) if __name__ == "__main__": - _main() \ No newline at end of file + _main() diff --git a/pyproject.toml b/pyproject.toml index 170e8f7..2e1fa96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "preprocess_cancellation" -version = "0.1.3" +version = "0.1.4" description = "GCode processor to add klipper cancel-object markers" authors = ["Franklyn Tackitt "] repository = "https://github.com/kageurufu/cancelobject-preprocessor"