You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the Python implementation, I've been enjoying experimenting with it to try and make a custom feed.
I'm not too knowledgeable with this side of programming, so apologies if this is a simple question, but I've seen in my log files that some posts are raising a ModelError because they're missing some data that is then getting caught by pydantic's validation.
This could be down to an error on my part, but any ideas or suggestions as to what might be causing this would be appreciated. Thanks in advance!
The error that's logged is as follows:
INFO:server.logger:Updated cursor for did:web:rapids.zacc.us to 3820959480
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 101, in _get_or_create
return model(**model_data)
^^^^^^^^^^^^^^^^^^^
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Commit blocks
Field required [type=missing, input_value={'ops': [], 'rev': '3lb75...: False, 'tooBig': True}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.9/v/missing
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_firehose/client.py", line 149, in _process_message_frame
self._on_message_callback(frame)
commit = parse_subscribe_repos_message(message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_firehose/firehose.py", line 58, in parse_subscribe_repos_message
return get_or_create(message.body, model_class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 69, in get_or_create
raise e
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 62, in get_or_create
model_instance = _get_or_create(model_data, model, strict=strict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zclem/bluesky-feed-generator/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 103, in _get_or_create
raise ModelError(str(e)) from e
atproto_client.exceptions.ModelError: 1 validation error for Commit blocks
Field required [type=missing, input_value={'ops': [], 'rev': '3lb75...: False, 'tooBig': True}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.9/v/missing
The text was updated successfully, but these errors were encountered:
Hi! My pleasure! The question is great and valid. I am working on it with bsky team sometimes. Here you can find more details and the history: MarshalX/atproto#186
I am gonna close it as duplicate. Thank you!
tl;dr server side bug; still waiting for the proper fix; nothing to do, just ignore such messages
Hi, thanks for the Python implementation, I've been enjoying experimenting with it to try and make a custom feed.
I'm not too knowledgeable with this side of programming, so apologies if this is a simple question, but I've seen in my log files that some posts are raising a ModelError because they're missing some data that is then getting caught by pydantic's validation.
This could be down to an error on my part, but any ideas or suggestions as to what might be causing this would be appreciated. Thanks in advance!
The error that's logged is as follows:
The text was updated successfully, but these errors were encountered: