-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Looks like set_and_wait was changed in release 1.7.0 (2022-08-04) of Ophyd and this breaks the tutorial "ophyd/03 - Staging.ipynb". I tried to figure out what the release notes were trying to tell me needed to change but couldn't make any progress.
Here's the line in the release notes:
Deprecated ophyd.utils.epics_pv.set_and_wait(obj, val) in favor of obj.set(val).wait(). This ensures that the same logic is used to determine if the signal is set as requested when used in a plan (via yield from bps.abs_set(...) or yield from bps.mv(...)) as from within ophyd methods.
And the error reported by jupyter labs in the docker container:
--------------------------------------------------------------------------- ImportError Traceback (most recent call last)
Cell In[21], line 1 ----> 1 from ophyd import Device, Component, EpicsSignal, EpicsSignalRO, set_and_wait, DeviceStatus
2 import time 4 class TriggeredDetector(Device):
ImportError: cannot import name 'set_and_wait' from 'ophyd' (/srv/conda/envs/notebook/lib/python3.10/site-packages/ophyd/`init.py)
Any suggestions would be appreciated!