You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Bug: issubclass cause error in IOMixin._get_access_paths #1584
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 6
4 topics: List[str]
5 dl = DocList[TestDoc]([TestDoc(topics=["a", "b"])])
----> 6 dl.to_dataframe()
File ~/miniconda3/envs/test/lib/python3.11/site-packages/docarray/array/doc_list/io.py:542, in IOMixinArray.to_dataframe(self)
535 if self.doc_type == AnyDoc:
536 raise TypeError(
537 'DocList must be homogeneous to be converted to a DataFrame.'
538 'There is no document schema defined. '
539 'Please specify the DocList\'s Document type using `DocList[MyDoc]`.'
540 )
--> 542 fields = self.doc_type._get_access_paths()
543 df = pd.DataFrame(columns=fields)
545 for doc in self:
File ~/miniconda3/envs/test/lib/python3.11/site-packages/docarray/base_doc/mixins/io.py:397, in IOMixin._get_access_paths(cls)
395 for field in cls.__fields__.keys():
396 field_type = cls._get_field_type(field)
--> 397 if not is_union_type(field_type) and issubclass(field_type, BaseDoc):
398 sub_paths = field_type._get_access_paths()
399 for path in sub_paths:
File <frozen abc>:123, in __subclasscheck__(cls, subclass)
TypeError: issubclass() arg 1 must be a class```
Activity
JoanFM commentedon May 28, 2023
What is the docarray version you are using?
lazyhope commentedon May 28, 2023
0.32.1
JoanFM commentedon May 28, 2023
Okey @lazyhope ,
Thanks for reporting. There is an instance of a call to issubclass that was left untouched.
We will fix this ASAP.
lazyhope commentedon May 28, 2023
Thanks a lot!