From 18f4f45bb5b1f78f2d3508df9684b9cf84c29484 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Mon, 16 Sep 2024 11:51:52 -0500 Subject: [PATCH] log the exception causing to revert to the precompiled fallback Signed-off-by: Brian S. Stephan --- gp2040ce_bintools/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gp2040ce_bintools/__init__.py b/gp2040ce_bintools/__init__.py index 1a20da0..d0930ec 100644 --- a/gp2040ce_bintools/__init__.py +++ b/gp2040ce_bintools/__init__.py @@ -65,5 +65,7 @@ def get_config_pb2(): except (ModuleNotFoundError, TypeError): # (TypeError could be the windows bug https://github.com/protocolbuffers/protobuf/issues/14345) # that failed, import a precompiled snapshot (may be lagging what's in GP2040-CE) + logger.exception("couldn't compile the proto files for the below reason:") sys.path.append(os.path.join(pathlib.Path(__file__).parent.resolve(), 'proto_snapshot')) + logger.warning("using the precompiled fallback!") return importlib.import_module('config_pb2')