Unable to fetch thread
Linus2punkt0 opened this issue · comments
After transition to pydantic I am no longer able to fetch threads. It might very well be a user error, but I can't see where.
Running:
bsky.app.bsky.feed.get_post_thread(params={"uri": uri})
and getting response:
File "/home/linus/.local/lib/python3.8/site-packages/atproto/xrpc_client/namespaces/sync_ns.py", line 403, in get_post_thread
return get_response_model(response, models.AppBskyFeedGetPostThread.Response)
File "/home/linus/.local/lib/python3.8/site-packages/atproto/xrpc_client/models/utils.py", line 98, in get_response_model
return get_or_create(response.content, model)
File "/home/linus/.local/lib/python3.8/site-packages/atproto/xrpc_client/models/utils.py", line 64, in get_or_create
raise e
File "/home/linus/.local/lib/python3.8/site-packages/atproto/xrpc_client/models/utils.py", line 57, in get_or_create
model_instance = _get_or_create(model_data, model, strict=strict)
File "/home/linus/.local/lib/python3.8/site-packages/atproto/xrpc_client/models/utils.py", line 89, in _get_or_create
raise ModelError(str(e)) from e
atproto.exceptions.ModelError: 1 validation error for Response
thread.`app.bsky.feed.defs#threadViewPost`.viewer
Extra inputs are not permitted [type=extra_forbidden, input_value={'canReply': True}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/extra_forbidden
I'm not sure what "extra inputs" it's receiving.
That's strange because I have tests for it here https://github.com/MarshalX/atproto/blob/main/tests/models/tests/test_thread_view_post_with_embed_media.py
Probably lexicon has been updated and I need to regenerate models
Or you found a specific thread with a custom lexicon... pls provide URI to reproduce
API schema has been changed. fixed in #150
fix version is 0.0.28. pls update