From 98d4f0e14aee651ca81dbc406fe6d3e88add19a1 Mon Sep 17 00:00:00 2001 From: Benjamin Jelley Date: Wed, 4 Feb 2026 16:33:53 -0500 Subject: [PATCH] fixed length str attrs --- pointCollection/data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pointCollection/data.py b/pointCollection/data.py index 4324296..eafde7c 100644 --- a/pointCollection/data.py +++ b/pointCollection/data.py @@ -874,7 +874,8 @@ def to_h5(self, fileOut, replace=True, group='/', extensible=True, for key, val in meta_dict[out_field].items(): if key.lower() not in ['group','source_field','precision','dimensions','coordinate']: if isinstance(val, str): - h5f_out[out_field_name.encode('ASCII')].attrs[key] = str(val).encode('utf-8') +# h5f_out[out_field_name.encode('ASCII')].attrs[key] = str(val).encode('utf-8') + h5f_out[out_field_name.encode('ASCII')].attrs.create(str(key), str(val).encode('utf-8'), None, dtype='