-
I've had this problem for a while and had it swept under the rug for a while. I still cannot think of a solution to this. I am confused as to why this has happened, as when looking at the network requests on the website, the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 18 replies
-
Hi! Could you please provide code snippet with the real ids to reproduce? |
Beta Was this translation helpful? Give feedback.
-
Hi! I was just wrestling with this exact problem, is there any update on releasing a fix? |
Beta Was this translation helpful? Give feedback.
-
Dev version of AT Protocol SDK powered by Pydantic v2. According to my unit tests, it already fixes all known issues with type resolution in Unions and literals. code snippet: post_uri = 'at://did:plc:hbtuqflamm5j2i7yahtzsnue/app.bsky.feed.post/3k3ic43ucbq2f'
response = client.app.bsky.feed.get_post_thread({'uri': post_uri, 'depth': 1, 'parentHeight': 0})
assert response.thread.post.embed.py_type == 'app.bsky.embed.recordWithMedia#view' now this code doesn't fail and the media is presented correctly Download: atproto-0.0.25.dev16.tar.gz |
Beta Was this translation helpful? Give feedback.
-
Fixed in https://github.com/MarshalX/atproto/releases/tag/v0.0.26 |
Beta Was this translation helpful? Give feedback.
EDIT: this is a type problem (explained below)
I've solved the issue, but it's... it's shocking
https://github.com/MarshalX/atproto/blob/main/atproto/xrpc_client/models/app/bsky/feed/defs.py#L25-L33
I moved
'models.AppBskyEmbedRecordWithMedia.View'
to the top of the list, and it started filling out the data correctly