From 3bb79abf26b49513cd38e6210ca1fcfd50c83318 Mon Sep 17 00:00:00 2001 From: elijahbenizzy Date: Mon, 10 Jun 2024 15:52:13 -0700 Subject: [PATCH] Fixes up the sdk so that we can use local modules for hamilton and it won't break --- ui/sdk/src/hamilton_sdk/driver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/sdk/src/hamilton_sdk/driver.py b/ui/sdk/src/hamilton_sdk/driver.py index 0b58053e6..fef577f1d 100644 --- a/ui/sdk/src/hamilton_sdk/driver.py +++ b/ui/sdk/src/hamilton_sdk/driver.py @@ -82,8 +82,10 @@ def safe_getmembers(module): ) continue # Check if the module is in the same top level package - if value.__package__ != module.__package__ and not value.__package__.startswith( - module.__package__ + if ( + value.__package__ != module.__package__ + and module.__package__ is not None + and value.__package__.startswith(module.__package__) ): logger.debug( f"Skipping hash for module {value.__name__} because it is in a different "