Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
This repository was 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

@GandElf47

Description

@GandElf47

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions