Skip to content

'py_type' | '$type' is not fully backward and forward compatible #354

@MarshalX

Description

@MarshalX

Need to investigate. We should fallback to DotDict class

Recent incident from get_author_feed method:

atproto_client.exceptions.ModelError: 1 validation error for Response
feed.0.post.embed.`app.bsky.embed.record#view`.record
  Input tag 'app.bsky.graph.defs#starterPackViewBasic' found using 'py_type' | '$type' does not match any of the expected tags: 'app.bsky.embed.record#viewRecord', 'app.bsky.embed.record#viewNotFound', 'app.bsky.embed.record#viewBlocked', 'app.bsky.feed.defs#generatorView', 'app.bsky.graph.defs#listView', 'app.bsky.labeler.defs#labelerView' [type=union_tag_invalid, input_value={'uri': 'at://did:plc:tcc...s#starterPackViewBasic'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/union_tag_invalid

could be reproduced using v0.0.48. v0.0.49 adds new union type

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions