When I attempt to save camera settings using the following 2 lines:
with tempfile.NamedTemporaryFile(suffix='.xml') as fp:
c.save_settings(fp.name, PersistType.All)
I get an exception with the following stack trace:
Traceback (most recent call last):
File "./camera_allied_vision.py", line 72, in getRescannedConnectedCameras
c.enter()
File "/opt/conda/lib/python3.8/site-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/camera.py", line 359, in enter
self._open()
File "/opt/conda/lib/python3.8/site-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/util/context_decorator.py", line 44, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/camera.py", line 907, in _open
raise exc from e
vimba.error.VimbaCameraError: Accessed Camera 'DEV_1AB22C000D01' with invalid Mode 'AccessMode.Full'. Valid modes are: (<AccessMode.Full: 1>, <AccessMode.Read: 2>)
Traceback (most recent call last):
File "./camera_allied_vision.py", line 72, in getRescannedConnectedCameras
c.enter()
File "/opt/conda/lib/python3.8/site-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/camera.py", line 359, in enter
self._open()
File "/opt/conda/lib/python3.8/site-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/util/context_decorator.py", line 44, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/camera.py", line 909, in _open
self.__feats = discover_features(self.__handle)
File "/opt/conda/lib/python3.8/site-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/vimba/feature.py", line 1242, in discover_features
call_vimba_c('VmbFeaturesList', handle, None, 0, byref(feats_count), sizeof(VmbFeatureInfo))
Any idea on what's going on here? Every once in a while the error manifests and won't go away until I unplug the camera's usb cable and reconnect. Then the camera will be fine for a while but the error will eventually come back.