diff --git a/src/pynwb/base.py b/src/pynwb/base.py index 42f7b7ff3..543b60d50 100644 --- a/src/pynwb/base.py +++ b/src/pynwb/base.py @@ -287,6 +287,13 @@ def __get_links(self, links): def __add_link(self, links_key, link): self.fields.setdefault(links_key, list()).append(link) + def _generate_field_html(self, key, value, level, access_code): + # reassign value if linked timestamp or linked data to avoid recursion error + if key in ['timestamp_link', 'data_link']: + value = {v.name: v.neurodata_type for v in value} + + return super()._generate_field_html(key, value, level, access_code) + @property def time_unit(self): return self.__time_unit