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
The following error occurs when I start listening to Aleph messages with AlephClient.watch_messaages():
ValidationError(model='AggregateMessage', errors=[{'loc': ('_id',), 'msg': 'value is not a valid dict', 'type': 'type_error.dict'}])>
Traceback (most recent call last):
File "/home/mik/PycharmProjects/yourtrading-ai/fishnet-cod/src/fishnet_cod/local_executor.py", line 50, in main
await listen()
File "/home/mik/PycharmProjects/yourtrading-ai/fishnet-cod/src/fishnet_cod/local_executor.py", line 37, in listen
async for message in aars_client.session.watch_messages(
File "/home/mik/PycharmProjects/yourtrading-ai/fishnet-cod/.venv/lib/python3.9/site-packages/aleph/sdk/client.py", line 812, in watch_messages
yield Message(**data)
File "/home/mik/PycharmProjects/yourtrading-ai/fishnet-cod/.venv/lib/python3.9/site-packages/aleph_message/models/__init__.py", line 333, in Message
return message_class(**message_dict)
File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for AggregateMessage
_id
value is not a valid dict (type=type_error.dict)
It seems there are sometimes messages with _id or id_ fields when querying api2.aleph.im
The text was updated successfully, but these errors were encountered:
The id_ field is a MongoDB ID and should never be shown, so that's a bug in the message API. I thought it was resolved. Anyway, it will never appear again with the new version so I wouldn't care too much about it.
The aggregate issue you mentioned is more problematic. Aggregates are supposed to be a key/value store. Some users post non-dict aggregates and these messages can be accepted on older pyaleph versions. I made the switch to enable this validation on the Postgres version, but it seems I was a bit trigger-happy with this change and I did not think about the messages currently stored on Mongo nodes. Here is the line that causes your problem in aleph-message.
The following error occurs when I start listening to Aleph messages with
AlephClient.watch_messaages()
:It seems there are sometimes messages with
_id
orid_
fields when querying api2.aleph.imThe text was updated successfully, but these errors were encountered: