-
Notifications
You must be signed in to change notification settings - Fork 9
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
RuntimeError from listdevice() #990
Comments
|
Perhaps the best way past this is to wrap apstools/apstools/utils/device_info.py Line 231 in 4a152d0
with try..except and return a value. But what value to return? The error message (Invalid array size (0, 0, 0) )? Something more terse?
|
If this is an unprimed area detector situation, it is harder to re-create the initial conditions. Need to take an existing AD and change its image parameters so that the ophyd object will raise the exception. Adding a unit test here could be contrived and possibly not realistic. Need to create a |
Ran again with this code change and an unprimed area detector. Error is now: In [5]: listdevice(adsimdet)
Subscription value callback exception (EpicsSignal(read_pv='ad:image1:ArrayData', name='adsimdet_image_array_data', parent='adsimdet_image', value=array([], dtype=uint8), timestamp=631152000.0, auto_monitor=True, string=False, write_pv='ad:image1:ArrayData', limits=False, put_complete=False))
Traceback (most recent call last):
File "/home/prjemian/.conda/envs/bluesky_2024_2/lib/python3.11/site-packages/ophyd/ophydobj.py", line 492, in inner
cb(*args, **kwargs)
File "/home/prjemian/.conda/envs/bluesky_2024_2/lib/python3.11/site-packages/ophyd/signal.py", line 696, in _derived_value_callback
value = self.inverse(value)
^^^^^^^^^^^^^^^^^^^
File "/home/prjemian/.conda/envs/bluesky_2024_2/lib/python3.11/site-packages/ophyd/areadetector/base.py", line 123, in inverse
raise RuntimeError(f"Invalid array size {self.derived_shape}")
RuntimeError: Invalid array size (0, 0, 0) Still an exception from |
SummaryWe can suppress that exception from causing |
The text was updated successfully, but these errors were encountered: