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

Handle InvalidHandleException when creating ImageAcquirer #465

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/harvesters/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

from genicam.gentl import TimeoutException, NotAvailableException
from genicam.gentl import GenericException as GenTL_GenericException, \
NotImplementedException, ResourceInUseException, InvalidParameterException
NotImplementedException, ResourceInUseException, InvalidParameterException, InvalidHandleException
from genicam.gentl import GenTLProducer, BufferToken
from genicam.gentl import EventManagerNewBuffer, EventManagerRemoteDevice, \
EventManagerModule
Expand Down Expand Up @@ -1669,6 +1669,8 @@ def __init__(self, *, parent: Harvester, device_proxy=None, config: Optional[Par
_logger.debug("resource in use: {}".format(module))
except InvalidParameterException:
_logger.debug("invalid parameter: {}".format(module))
except InvalidHandleException:
_logger.debug("invalid handle: {}".format(module))
else:
self._module_event_monitor_thread_dict[module] = \
self._thread_factory_method_for_event_module()
Expand Down