From e6ab24bc2e41f746d732c62c646f536b820009f1 Mon Sep 17 00:00:00 2001 From: k034b363 Date: Fri, 11 Oct 2024 16:05:34 -0500 Subject: [PATCH] add os path join to try to fix deepsource external file issue --- plantcv/geospatial/points_to_geojson.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plantcv/geospatial/points_to_geojson.py b/plantcv/geospatial/points_to_geojson.py index 6c2d47e..035a677 100644 --- a/plantcv/geospatial/points_to_geojson.py +++ b/plantcv/geospatial/points_to_geojson.py @@ -2,6 +2,7 @@ import geojson import rasterio +import os from plantcv.plantcv import fatal_error @@ -34,5 +35,5 @@ def points_to_geojson(img, viewer, out_path): "name": rasterio.crs.CRS.to_string(img.metadata["crs"]) } } - with open(out_path, 'w') as f: + with open(os.path.join(out_path, '.geojson'), 'w') as f: geojson.dump(feature_collection, f)