Skip to content

Move plan parameter deserialization is broken #119

Closed

Description

@callumforrester

The move plan cannot process it's arguments following the move to pydantic. It gives the following error:

ERROR:blueapi.worker.reworker:1 validation error for ParsingModel[group]
__root__ -> moves
  'int' object is not subscriptable (type=type_error)
Traceback (most recent call last):
  File "/home/vid18871/projects/blueapi/src/blueapi/worker/reworker.py", line 94, in _cycle
    self._current.task.do_task(self._ctx)
  File "/home/vid18871/projects/blueapi/src/blueapi/worker/task.py", line 45, in do_task
    """
  File "/home/vid18871/projects/blueapi/src/blueapi/worker/task.py", line 66, in _lookup_params
    sanitized_params = lookup_params(ctx, plan, self.params)
  File "/home/vid18871/projects/blueapi/venv/lib/python3.8/site-packages/pydantic/tools.py", line 38, in parse_obj_as
    return model_type(__root__=obj).__root__
  File "/home/vid18871/projects/blueapi/venv/lib/python3.8/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[group]
__root__ -> moves
  'int' object is not subscriptable (type=type_error)

Activity

  1. added
    bug
    on Apr 14, 2023
  2. changed the title [-]Move plan broken[/-] [+]Move plan parameter deserialization is broken[/+] on Apr 14, 2023
  3. tpoliaw commented on Apr 19, 2023

    @tpoliaw
    Contributor

    Steps to reproduce:

    • Install blueapi via steps in docs here
    • Run python -m blueap worker to run the server locally
    • Run python -m blueapi controller run move -p '{"moves": {"foo": 23}}' (from another terminal) to request a move.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions