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

Adding a grid_scan plan to the queueserver fails pydantic validation #361

Open
Cathyhjj opened this issue Jan 29, 2025 · 0 comments
Open

Comments

@Cathyhjj
Copy link
Collaborator

Describe the bug
When adding grid scan on firefly ui, it didn't add to the queueserver

Error message

Grid plan failed to be added to queue server


For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type
Plan: {'item_type': 'plan',
 'name': 'rel_grid_scan',
 'args': [['It'], 'Sam H Cds', -10.0, 10.0, 1, 'Sam H Cds', -10.0, 10.0, 1],
 'kwargs': {'snake_axes': False, 'md': {}}}
Traceback (most recent call last):
  File "/home/beams0/S25IDCUSER/miniforge3/envs/haven/lib/python3.10/site-packages/qasync/__init__.py", line 780, in _error_handler
    task.result()
  File "/home/beams0/S25IDCUSER/miniforge3/envs/haven/lib/python3.10/site-packages/firefly/controller.py", line 660, in add_queue_item
    await self._queue_client.add_queue_item(item)
bluesky_queueserver_api.comm_base.RequestFailedError: Request failed: Failed to add an item: Plan validation failed: Unable to generate pydantic-core schema for <class 'collections.abc.Iterable'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
@canismarko canismarko changed the title gridscan plan doesn't work Adding a grid_scan plan to the queueserver fails pydantic validation Jan 29, 2025
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

1 participant