-
Notifications
You must be signed in to change notification settings - Fork 23
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 an mv plan to the queue fails pydantic validation #310
Comments
@danielballan this feels related to the problem reported by Zach Arthur in the community call last week. |
@canismarko you said this previously worked. What version of qserver api or qserver did it work with? |
And can you share the code from the qserver RE ipython env where you define the count and mv plans. Do you set any plan annotation? |
@whs92 I set up a completely separate environment so I could test this better. I found that actually the bluesky version is what determines whether this issue pops up:
† I couldn't test older bluesky-queueserver versions with bluesky==1.13.0 because those annotated plan stubs aren't recognized by bluesky-queueserver.
No, I just imported the standard bluesky plan stubs. Here is the queueserver startup code: https://gist.github.com/canismarko/3dde96e28c1dda1784d07801123d5934#file-queue_mv_plan_startup-py |
The issue is reproducible with Bluesky from main branch. It is being resolved in #312 Currently it's half-working: the |
I'm trying to add an item to the queue using the bluesky-queueserver-api package. It receives a response from the queueserver saying that
Plan validation failed: Unable to generate pydantic-core schema for <class 'bluesky.protocols.NamedMovable'>
.Expected Behavior
The queue should contain a new item that will execute the
bps.mv
plan using the device specified. We should also get a response withresponse['status'] == True
.Current Behavior
The request fails, with an error message saying that pydantic validation failed. Here is the ipython session that had this issue.
https://gist.github.com/canismarko/ef234d5336e1f325139036a5384a4799
sim_motor_2
is an instance ofophyd_async.epics.motor.Motor
. Further down, I tried with a different plan, namelybp.count
, and this worked. In that case,sim_det
is a threaded ophyd area detector, andI0
is anophyd_async.core.StandardReadable
object.Steps to Reproduce (for bugs)
mv_plan = BPlan("mv", "sim_motor_2", 5)
api.item_add(mv_plan)
Context
I have a GUI that uses the queueserver to execute plans. We have a window for adding the mv plan. This user selects the device for the mv plan, and the destination, then clicks a button that creates the BPlan item and send it to the queueserver.
Your Environment
Here are all the packages installed in the environment: https://gist.github.com/canismarko/ef234d5336e1f325139036a5384a4799#file-mamba-list I tried this with both bluesky 1.13, and bluesky installed directly from github (1.14.dev23+g3bce96b8). Here is the specific device that I'm using the make
sim_motor_2
: https://github.com/spc-group/haven/blob/f8855aa160f23c7f7222541c430f3d9c20cd1c14/src/haven/devices/motor.py#L19The text was updated successfully, but these errors were encountered: