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

resolve RuntimeError from listdevice() with an area detector object #1013

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

prjemian
Copy link
Contributor

@prjemian prjemian added the bug label Aug 26, 2024
@prjemian prjemian added this to the 1.7.0 milestone Aug 26, 2024
@prjemian prjemian self-assigned this Aug 26, 2024
@prjemian
Copy link
Contributor Author

prjemian commented Aug 28, 2024

Root cause: area detector IOC has just started and no image data has been passed from cam to image plugins. Image shape tuple is all zeroes. This is raised by ophyd.areadetector.base. We can trap that so that listdevice() will not fail. User will still see a Subscription value callback exception that is internal to ophyd.areadetector.base.

Nothing we can do about that here. User should be advised to enable the image plugin and acquire an image after which the error message will not appear.

@prjemian prjemian marked this pull request as ready for review August 28, 2024 17:48
Copy link
Collaborator

@MDecarabas MDecarabas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's add somewhere a place about how to use this function. Maybe inside the docstring

@prjemian
Copy link
Contributor Author

@prjemian prjemian merged commit 5ccc37d into main Sep 18, 2024
9 of 13 checks passed
@prjemian prjemian deleted the 990-listdevice-RuntimeError branch September 18, 2024 04:31
@prjemian
Copy link
Contributor Author

The workflow failure after the merge will be resolved by another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

RuntimeError from listdevice()
2 participants