Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MarshalX opened this issue Jul 16, 2024 · 1 comment
Open

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

MarshalX opened this issue Jul 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MarshalX
Copy link
Owner

MarshalX commented Jul 16, 2024

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

@MarshalX MarshalX added the bug Something isn't working label Jul 16, 2024
@MarshalX
Copy link
Owner Author

The same happened again. Again with embeds. On v0.0.49

Input tag 'app.bsky.embed.record#viewDetached' found using 'py_type' | '$type' does not match any of the expected tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant