diff --git a/leafmap/common.py b/leafmap/common.py index bdc8a805fc..05e38b7fb9 100644 --- a/leafmap/common.py +++ b/leafmap/common.py @@ -10510,7 +10510,8 @@ def array_to_memory_file( ) if hasattr(array, "rio"): if hasattr(array.rio, "crs"): - crs = array.rio.crs + if array.rio.crs is not None: + crs = array.rio.crs if transform is None and hasattr(array.rio, "transform"): transform = array.rio.transform() elif source is None: