-
Notifications
You must be signed in to change notification settings - Fork 34
Failure to recover from RuntimeError when grabbing multiple images #21
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
Comments
I made a PR and added a |
I think it might be a good idea to check if the camera is still grabbing and stop it before restarting it. Also checking while still being in the iterator. I'll try this sooninsh, as I'm not in the lab and with the camera atm. |
I've pulled down Zac's PR and had a play and a call to stop_grabbing() inside the exception handler fixes this issue. Once #17 is merged I'll generate a another PR on top of it that wraps the grab_images() internals with an exception handler that calls stop_grabbing() before re-raising, to relieve clients of burden of knowing that they need to do this. |
Fix in PR #22 |
Running Pylon libraries from within linux Mint 18 VM on Windows 7 VirtualBox host.
Occasionally get
thrown on camera.grab_image() call (due to delays/issues with VM network adapter bridge to host physical adapter I guess) however if the exception is caught, subsequent calls to grab_image() will complete successfully.
However if I try to grab multiple images using the grab_images() method, as follows
once the above mentioned exception has occurred, all further calls to grab_images() fail with an un-commented RuntimeError.
The text was updated successfully, but these errors were encountered: