VimbaCError(<VmbError.BadParameter: -7>)
The issue is with Vimba 4.2 Python API. When I try to run the list_features.py, it throws me the VimbaCError(<VmbError.BadParameter: -7>) exception in vimba_c.py file at line 671. I'm running it in Anaconda environment. The error occurs at 'with' initialization at line 111 in the list_features.py example code. with get_camera(cam_id) as cam: The list_camera.py example seems to be working fine as it can recognize the camera.
Nothing was changed in the code.
Would it be possible for you to copy the entire error message you receive here? It seems like some unexpected return code is received by VimbaPython which can not be converted into a proper VimbaCError. That is very unexpected because all return codes from VimbaC should be mapped to appropriate instances in VimbaPython.
As the error is triggered on the line which attempts to open the camera connection my first guess would be that perhaps some unexpected characters are passed to the get_camera function. Did you enter any text after the filename on the commandline when you executed the example? Perhaps there was also some 'hidden' character caused by accidentally pressing multiple keys on the keyboard? Can you execute other examples that require an active camera connection? list_cameras.py does not open a connection. So perhaps there is something odd happening when VimbaPython attempts to connect to the device itself?
I have the same here on a Raspberry Pi 4 :
pi@rpi:/opt/Vimba_4_0/VimbaPython/Examples $ python3 list_features.py 'DEV_000F315D31A6'
///////////////////////////////////////
/// Vimba API List Features Example ///
///////////////////////////////////////
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 896, in _open
byref(self.__handle))
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/c_binding/vimba_c.py", line 758, in call_vimba_c
getattr(_lib_instance, func_name)(*args)
File "/usr/local/lib/python3.7/dist-packages/vimba/c_binding/vimba_c.py", line 676, 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 "list_features.py", line 124, in <module>
main()
File "list_features.py", line 116, in main
with get_camera(cam_id) as cam:
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 364, in __enter__
self._open()
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/util/context_decorator.py", line 49, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 912, in _open
raise exc from e
vimba.error.VimbaCameraError: <VmbError.BadParameter: -7>
@clavay this is also surprising. A BadParameter error usually indicates some kind of problem with illegal pointers being used, but since you are using an official example I would be surprised by this.
What I do see is that you have quotation marks around your camera device ID when you start the python script. Please remove these and try again to see if this allows you to access the camera: python3 list_features.py DEV_000F315D31A6.
When I tried opening a camera on my machine with the quotation marks around the device ID I got a different message from the example that is closer to what I expected: Failed to access Camera ''DEV_1AB22D01BBB8''. Abort.. This is caused by the additional quotation marks I mentioned above (note that these are two ' next to each other).
I have the same :
pi@rpi:/opt/Vimba_4_0/VimbaPython/Examples $ python3 list_features.py DEV_000F315D31A6
///////////////////////////////////////
/// Vimba API List Features Example ///
///////////////////////////////////////
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 896, in _open
byref(self.__handle))
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/c_binding/vimba_c.py", line 758, in call_vimba_c
getattr(_lib_instance, func_name)(*args)
File "/usr/local/lib/python3.7/dist-packages/vimba/c_binding/vimba_c.py", line 676, 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 "list_features.py", line 119, in <module>
main()
File "list_features.py", line 111, in main
with get_camera(cam_id) as cam:
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 364, in __enter__
self._open()
File "/usr/local/lib/python3.7/dist-packages/vimba/util/tracer.py", line 139, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/util/context_decorator.py", line 49, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/vimba/camera.py", line 912, in _open
raise exc from e
vimba.error.VimbaCameraError: <VmbError.BadParameter: -7>
Does list_features.py work if you do not pass any camera device ID? It should open the first camera it detects and list the features for that.
I have the same error.
list camera is working :
python3 list_cameras.py
//////////////////////////////////////
/// Vimba API List Cameras Example ///
//////////////////////////////////////
Cameras found: 3
/// Camera Name : Mako
/// Model Name : Mako G-234C (6409)
/// Camera ID : DEV_000F315D3231
/// Serial Number : 50-0536978865
/// Interface ID : br0
/// Camera Name : Mako
/// Model Name : Mako G-507C (9617)
/// Camera ID : DEV_000F315D31A6
/// Serial Number : 50-0536978726
/// Interface ID : br0
/// Camera Name : Mako
/// Model Name : Mako G-234C (6409)
/// Camera ID : DEV_000F315D31A8
/// Serial Number : 50-0536978728
/// Interface ID : br0
I have the same error with the VimbaC example :
/opt/Vimba_4_0/VimbaC/Examples/Bin/arm_32bit $ ./ListFeatures
///////////////////////////////////////
/// Vimba API List Features Example ///
///////////////////////////////////////
Vimba Version Major: 1 Minor: 8 Patch: 2
Could not open camera. Error code: -7
Thank you for the detailed information!
I have the same error with the VimbaC example :
That means that this is a problem that is not caused by VimbaPython. It might be caused by VimbaC or the Transport Layer you are trying to use (seems like the GigETL). My suggestion would be to contact our application support via the form on our website. They have a lot more experience in these general troubleshooting situations and will probably be able to help you quicker. Feel free to reference this Github issue too so they can see what you already mentioned.
FYI, this very error message can occur with the GigEthernet transport layer when example scripts such as list_features.py are called without specifying a camera ID as argument. The API then picks the first camera although it might be unavailable at that time.
Specifying the camera ID solves that problem.
Experienced the same error with list_features.py. This occurred with the camera connected via the office LAN. Connected the camera directly to the LAN port and the error disappeared. Suspect it is caused by a Packet Size mismatch?
Experienced the same error with list_features.py. This occurred with the camera connected via the office LAN. Connected the camera directly to the LAN port and the error disappeared. Suspect it is caused by a Packet Size mismatch?
Is this the same as the GV buffer issue AlliedVision lists in the support docs?