VimbaPython
VimbaPython copied to clipboard
vimba.error.VimbaCameraError: <VmbError.BadParameter: -7>
Hi, I have just downloaded the Vimba6 Python SDK to my Ubuntu 22.04 machine and run
python list_cameras.py
//////////////////////////////////////
/// Vimba API List Cameras Example ///
//////////////////////////////////////
Cameras found: 1
/// Camera Name : GT4400
/// Model Name : GT4400 (02-2696D)
/// Camera ID : DEV_000F3103A5AA
/// Serial Number : 02-2696D-07103
/// Interface ID : enp0s31f6
python list_features.py DEV_000F3103A5AA
///////////////////////////////////////
/// Vimba API List Features Example ///
///////////////////////////////////////
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/vimba/camera.py", line 907, in _open
call_vimba_c('VmbCameraOpen', self.__info.cameraIdString, self.__access_mode,
File "/usr/local/lib/python3.10/dist-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/vimba/c_binding/vimba_c.py", line 757, in call_vimba_c
getattr(_lib_instance, func_name)(*args)
File "/usr/local/lib/python3.10/dist-packages/vimba/c_binding/vimba_c.py", line 675, in _eval_vmberror
raise VimbaCError(result)
vimba.c_binding.vimba_common.VimbaCError: VimbaCError(<VmbError.BadParameter: -7>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/Vimba_6_0/VimbaPython/Examples/list_features.py", line 119, in <module>
main()
File "/opt/Vimba_6_0/VimbaPython/Examples/list_features.py", line 111, in main
with get_camera(cam_id) as cam:
File "/usr/local/lib/python3.10/dist-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/vimba/camera.py", line 362, in __enter__
self._open()
File "/usr/local/lib/python3.10/dist-packages/vimba/util/tracer.py", line 134, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/vimba/util/context_decorator.py", line 44, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/vimba/camera.py", line 924, in _open
raise exc from e
vimba.error.VimbaCameraError: <VmbError.BadParameter: -7>
I also tried this:
import vimba
with vimba.Vimba.get_instance() as v:
camera = v.get_all_cameras()[0]
print(camera)
with camera as cam:
print(cam)
I got the same error as soon I use the with
context for the camera.
Sorry, it turned out to be a network issue. After connecting the camera to a router instead to the laptop directly the scripts are working again.