From c454c6ebb1259c0eb814d938439f57755a0c7fd7 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Mon, 6 Nov 2023 13:06:37 -0800 Subject: [PATCH] try --- src/hdmf/common/table.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hdmf/common/table.py b/src/hdmf/common/table.py index 720afa060..92b443936 100644 --- a/src/hdmf/common/table.py +++ b/src/hdmf/common/table.py @@ -281,11 +281,14 @@ def __gather_columns(cls, name, bases, classdict): if len(bases) and 'DynamicTable' in globals(): for item in bases[::-1]: # reverse the bases tuple as the code suggest it should be last if issubclass(item, Container): - if item.__columns__ is not cls.__columns__: - new_columns = list(cls.__columns__) - new_columns[0:0] = item.__columns__ # prepend superclass columns to new_columns - cls.__columns__ = tuple(new_columns) - break + try: + if item.__columns__ is not cls.__columns__: + new_columns = list(cls.__columns__) + new_columns[0:0] = item.__columns__ # prepend superclass columns to new_columns + cls.__columns__ = tuple(new_columns) + break + except AttributeError: # raises error when "__columns__" is not an attr of item + continue @docval({'name': 'name', 'type': str, 'doc': 'the name of this table'}, # noqa: C901 {'name': 'description', 'type': str, 'doc': 'a description of what is in this table'},