From eec215d945c9d8d074cc0fdb83f964d5062a27a4 Mon Sep 17 00:00:00 2001 From: JoshuaTang <1240604020@qq.com> Date: Sun, 2 Nov 2025 21:55:40 -0800 Subject: [PATCH] fix: fix the import error when running pytest --- python/python/lance_graph/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/python/lance_graph/__init__.py b/python/python/lance_graph/__init__.py index df5880963..62d6958b5 100644 --- a/python/python/lance_graph/__init__.py +++ b/python/python/lance_graph/__init__.py @@ -15,7 +15,10 @@ def _load_bindings() -> ModuleType: try: from . import _internal as bindings # type: ignore[attr-defined] except ImportError: - bindings = _load_dev_build() + try: + import _internal as bindings # type: ignore[import-not-found] + except ImportError: + bindings = _load_dev_build() return bindings