From bbabf64b36b1d3225edab793ed28dbf47cfc6b38 Mon Sep 17 00:00:00 2001 From: Forrest Collman Date: Sun, 11 Feb 2024 15:04:04 -0800 Subject: [PATCH] fix: relationship key encoded incorrectly --- python/neuroglancer/write_annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/neuroglancer/write_annotations.py b/python/neuroglancer/write_annotations.py index ee8c17bc3..d1728e6ea 100644 --- a/python/neuroglancer/write_annotations.py +++ b/python/neuroglancer/write_annotations.py @@ -470,8 +470,8 @@ def _serialize_annotations_by_related_id(self, path, related_id_dict, shard_spec dataset = ts.KvStore.open(spec).result() txn = ts.Transaction() for related_id, annotations in related_id_dict.items(): - # convert the ann.id to a binary representation of a uint64 - key = related_id.to_bytes(8, "little") + # convert the related_id to a binary representation of a uint64 + key = np.ascontiguousarray(related_id, dtype=">u8").tobytes() value = self._encode_multiple_annotations(annotations) dataset.with_transaction(txn)[key] = value txn.commit_async().result()