alliedvision / VmbPy

Python API of the Vimba X SDK
BSD 2-Clause "Simplified" License
24 stars 9 forks source link

VmbCError(<VmbError.InternalFault: -1>) #25

Closed julienenpc closed 7 months ago

julienenpc commented 9 months ago

Hello, My camera works in Vimba X. Python worked to run a Gx3300 ethernet camera. However when i use a usb camera it doesn't work : i have the VmbCError(<VmbError.InternalFault: -1>) error.

If i do the "list-camera.py" from example i get : _////////////////////////////////// /// VmbPy List Cameras Example /// //////////////////////////////////

Cameras found: 1 /// Camera Name : Allied Vision 1800 U-1620m /// Model Name : 1800 U-1620m /// Camera ID : DEV_1AB22C024B86 /// Serial Number : 0381Y /// Interface ID : VimbaUSBInterface0x0

However, when i try a grab with example code or a simple code i have the error :

_from vmbpy import *

with VmbSystem.get_instance () as vmb: cams = vmb.get_all_cameras () with cams [0] as cam: arr = cam.getframe ()

As adviced i tried to reinstalled the whl (python -m pip --force-reinstall vmbpy-1.0.2-py3-none-any.whl), the installation worked but still the same issue. Do you have any idea to make it work?

Teresa-AlliedVision commented 9 months ago

Hi, I would need some further info:

julienenpc commented 8 months ago

Hello, The camera firmwareVersion is 10.0.6C9062B1 I'm on windows 10 with a laptop The maximum frame rate in Vimba was 11.8627 with a Device link throughput Limit set on 200000000. Itried to put it at 450000000 and had a fps at 26.18 Hz The pixel format is 5312x3040 The device link speed is 450000000 The camera is on a USB 3.1 gen 1 on my laptop Thanks,

De: "Teresa-AlliedVision" @.> À: "alliedvision/VimbaPython" @.> Cc: "julienenpc" @.>, "Author" @.> Envoyé: Mardi 27 Février 2024 11:24:45 Objet: Re: [alliedvision/VimbaPython] VmbCError(<VmbError.InternalFault: -1>) (Issue alliedvision/VmbPy#25)

Hi, I would need some further info:

* camera firmware version (check the Firmware Upadater or the feature for DeviceFirmwareVersion) 
* OS 
* Type of host system (Laptop, Tower PC, Embedded) 
* How the camera behaves in VimbaX Viewer: Max FPS and throughput (increment DeviceLinkThroughputLimit until the FPS dial bcomes unstable) 
* Pixel format of the camera 
* Value for DeviceLinkSpeed 
* How the camera is connected: PCIE card with USB3 ports, USB2 ports, integrated USB controller, switches, adapters, 

— Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: <alliedvision/VimbaPython/issues/180/1966235390 @ github . com> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/alliedvision/VmbPy/issues/25", "url": "https://github.com/alliedvision/VmbPy/issues/25", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

julienenpc commented 8 months ago

Just in case it helps, here the full error i get:

from vmbpy import * ​ with VmbSystem . get_instance () as vmb : cams = vmb . get_all_cameras () with cams [ 0 ] as cam : arr = cam . get_frame ()

--------------------------------------------------------------------------- VmbCError Traceback (most recent call last) C:\Users\JULIEN~1.ARC\AppData\Local\Temp/ipykernel_4504/1937688060.py in 3 with VmbSystem . get_instance ( ) as vmb : 4 cams = vmb . get_all_cameras ( ) ----> 5 with cams [ 0 ] as cam : 6 arr = cam . get_frame ( ) C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (*args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , * kwargs ) : --> 131 result = func ( args , kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\camera.py in enter (self) 104 def enter ( self ) : 105 if not self . context_cnt : --> 106 self . _open ( ) 107 108 self . context_cnt += 1 C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (*args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , * kwargs ) : --> 131 result = func ( args , kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\context_decorator.py in wrapper (*args, kwargs) 42 args [ 0 ] . _context_entered = True 43 try : ---> 44 return func ( * args , * kwargs ) 45 except Exception : 46 # If an error occurs during the function call, we do not consider the context to be C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\camera.py in _open (self) 515 parent_cam=self)) 516 self . __local_device = LocalDevice ( self . __info . localDeviceHandle ) --> 517 self . _attach_feature_accessors ( ) 518 519 @ TraceEnable ( ) C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , kwargs ) : --> 131 result = func ( * args , * kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\featurecontainer.py in _attach_feature_accessors (self) 62 def _attach_feature_accessors ( self ) : 63 if not self . __context_cnt : ---> 64 self . _feats = discover_features ( self . _handle ) 65 attach_feature_accessors ( self , self . _feats ) 66 C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , kwargs ) : --> 131 result = func ( * args , * kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\feature.py in discover_features (handle) 1207 1208 for info in feats_infos [ : feats_found . value ] : -> 1209 result . append ( _build_feature ( handle , info ) ) 1210 1211 return tuple ( result ) C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\feature.py in _build_feature (handle, info) 1172 1173 elif VmbFeatureData . Enum == feat_value : -> 1174 feat = EnumFeature ( handle , info ) 1175 1176 elif VmbFeatureData . Command == feat_value : C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , kwargs ) : --> 131 result = func ( * args , * kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\feature.py in init (self, handle, info) 487 super ( ) . init ( handle , info ) 488 --> 489 self . __entries : EnumEntryTuple = _discover_enum_entries ( self . _handle , self . _info . name ) 490 491 def str ( self ) : C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , kwargs ) : --> 131 result = func ( * args , * kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\feature.py in _discover_enum_entries (handle, feat_name) 592 enums_count = VmbUint32 ( 0 ) 593 --> 594 call_vmb_c ( 'VmbFeatureEnumRangeQuery' , handle , feat_name , None , 0 , byref ( enums_count ) ) 595 596 if enums_count . value : C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\util\tracer.py in wrapper (args, kwargs) 129 if _Tracer . is_log_enabled ( ) : 130 with _Tracer ( func , * args , * kwargs ) : --> 131 result = func ( args , * kwargs ) 132 133 return result C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\c_binding\vmb_c.py in call_vmb_c (func_name, args) 889 """ 890 global _lib_instance --> 891 getattr ( _lib_instance , func_name ) ( args ) C:\ProgramData\Miniconda3\lib\site-packages\vmbpy\c_binding\vmb_c.py in _eval_vmberror (result, func, args) 813 def _eval_vmberror ( result : VmbError , func : Callable [ ... , Any ] , * args : Tuple [ Any , ... ] ) : 814 if result not in ( VmbError . Success , None ) : --> 815 raise VmbCError ( result ) 816 817 VmbCError : VmbCError(<VmbError.InternalFault: -1>)

De: "Teresa-AlliedVision" @.> À: "alliedvision/VimbaPython" @.> Cc: "julienenpc" @.>, "Author" @.> Envoyé: Mardi 27 Février 2024 11:24:45 Objet: Re: [alliedvision/VimbaPython] VmbCError(<VmbError.InternalFault: -1>) (Issue alliedvision/VmbPy#25)

Hi, I would need some further info:

* camera firmware version (check the Firmware Upadater or the feature for DeviceFirmwareVersion) 
* OS 
* Type of host system (Laptop, Tower PC, Embedded) 
* How the camera behaves in VimbaX Viewer: Max FPS and throughput (increment DeviceLinkThroughputLimit until the FPS dial bcomes unstable) 
* Pixel format of the camera 
* Value for DeviceLinkSpeed 
* How the camera is connected: PCIE card with USB3 ports, USB2 ports, integrated USB controller, switches, adapters, 

— Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: <alliedvision/VimbaPython/issues/180/1966235390 @ github . com> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/alliedvision/VmbPy/issues/25", "url": "https://github.com/alliedvision/VmbPy/issues/25", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Teresa-AlliedVision commented 7 months ago

This seems to be a known issue with Firmware 10. Please update to the latest version, currently 13, from our website: https://www.alliedvision.com/de/support/firmware-downloads/ Feel free to reopen the issue or put in a support request through our webiste form, if it issue persists.

The rest of the setup and the behaviour in Vimba Viewer look good, so I don't expect other issues.