From 5f89070426d69229a1e821eb6695d1298577b3d2 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Thu, 22 Aug 2024 08:10:55 -0700 Subject: [PATCH] Update src/hdmf/backends/hdf5/h5_utils.py Co-authored-by: Ryan Ly --- src/hdmf/backends/hdf5/h5_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hdmf/backends/hdf5/h5_utils.py b/src/hdmf/backends/hdf5/h5_utils.py index f5d74dd5e..278735fbc 100644 --- a/src/hdmf/backends/hdf5/h5_utils.py +++ b/src/hdmf/backends/hdf5/h5_utils.py @@ -111,6 +111,12 @@ def shape(self): def append(self, arg): # Get Builder builder = self.io.manager.get_builder(arg) + if builder is None: + raise ValueError( + "The container being appended to the dataset has not yet been built. " + "Please write the container to the file, then open the modified file, and " + "append the read container to the dataset." + ) # Get HDF5 Reference ref = self.io._create_ref(builder)