Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Any way for checking if the camera is open or shut? #164

Open
momarms opened this issue Jul 12, 2023 · 1 comment
Open

Any way for checking if the camera is open or shut? #164

momarms opened this issue Jul 12, 2023 · 1 comment

Comments

@momarms
Copy link

momarms commented Jul 12, 2023

Hi,

I am a bit new and have been using the API with a multi-camera GUI. The cameras are in both 'SingleFrame' and 'Continuous' mode usage depending upon the requirement.
Suppose for xyz reasons my GUI crashes and I am not able to shut the cameras properly. (I am not sure whether the cameras close properly if the GUI crashes.)
When I restart the GUI, I get the following error while opening the cameras.

        raise VimbaException(error)
pymba.vimba_exception.VimbaException: Operation is invalid with the current access mode.

I have to unplug and replug the cameras or restart my system to make them work again.
I want to test whether this is being caused by the cameras not closing properly or because of some other reason.

I cannot simply use a .close() command before opening them as it would also lead to an error if the cameras are not already open.

Is there any way I can check whether the cameras are open or shut before I actually run the .open() command?
I have tried a few conditions but all of them seem to rely on the camera being already open or shut.
If you think this could be happening because of something else, I would appreciate any advice on that too.

Thanks!

@Teresa-AlliedVision
Copy link

Pymba is not the official Vimba Python API, so we can't tell if the camera is being closed properly or why not.
The error message does imply, that the camera was not closed correctly.

There is a Github for Pymba that you can contact with issues, otherwise I would recommend to switch to Vimby Python (installed together with the Vimba SDK).
Pymba Github

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants