From c43c428010d92f957f2bd6a6231c63fe15300272 Mon Sep 17 00:00:00 2001 From: Jona Date: Mon, 30 Oct 2023 08:47:43 -0400 Subject: [PATCH] Use relative path import --- cerulean_cloud/cloud_run_orchestrator/handler.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cerulean_cloud/cloud_run_orchestrator/handler.py b/cerulean_cloud/cloud_run_orchestrator/handler.py index 98c2de97..6a46aad9 100644 --- a/cerulean_cloud/cloud_run_orchestrator/handler.py +++ b/cerulean_cloud/cloud_run_orchestrator/handler.py @@ -63,9 +63,12 @@ def get_landmask_gdf(): """ global landmask_gdf if landmask_gdf is None: - landmask_gdf = gpd.read_file( - "gadmLandMask_simplified/gadmLandMask_simplified.shp" - ).to_crs("EPSG:3857") + mask_path = os.path.join( + os.path.dirname(__file__), + "gadmLandMask_simplified", + "gadmLandMask_simplified.shp", + ) + landmask_gdf = gpd.read_file(mask_path).to_crs("EPSG:3857") return landmask_gdf