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

Odd error from pydantic when working with firehose #444

Closed
jaherron opened this issue Nov 20, 2024 · 1 comment
Closed

Odd error from pydantic when working with firehose #444

jaherron opened this issue Nov 20, 2024 · 1 comment

Comments

@jaherron
Copy link

I keep getting exceptions that look like this when trying to parse the firehose.

Process ForkPoolWorker-1:
Traceback (most recent call last):
  File "/home/jaherron/code/python/skyalert/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 101, in _get_or_create
    return model(**model_data)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/jaherron/code/python/skyalert/.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': '3lbdb...: 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/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.12/multiprocessing/pool.py", line 109, in worker
    initializer(*initargs)
  File "/home/jaherron/code/python/skyalert/skyalert-firehose.py", line 229, in worker_main
    commit = parse_subscribe_repos_message(message)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jaherron/code/python/skyalert/.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/jaherron/code/python/skyalert/.venv/lib/python3.12/site-packages/atproto_client/models/utils.py", line 69, in get_or_create
    raise e
  File "/home/jaherron/code/python/skyalert/.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/jaherron/code/python/skyalert/.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': '3lbdb...: False, 'tooBig': True}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.9/v/missing
@MarshalX
Copy link
Owner

hi! duplicates #186

@MarshalX MarshalX closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants