Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Bug: Bug serializing and deserializing with nested Union of BaseDocs #1553

Closed

Description

@JoanFM
from docarray import BaseDoc
from docarray.documents import TextDoc, ImageDoc
class CustomDoc(BaseDoc):
    ud: Union[TextDoc, ImageDoc] = TextDoc(text='I am in union')

docs = DocList[CustomDoc]([CustomDoc( ud=TextDoc(text='I am in union'))])

DocList[CustomDoc].from_protobuf(original_docs.to_protobuf())

Gets:

AttributeError: '_SpecialForm' object has no attribute 'from_protobuf'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions