-
Notifications
You must be signed in to change notification settings - Fork 91
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
Error when trying to acquire images - Buffer None #479
Comments
Hi paulosousa32, I am not sure if this might be an issue, but I would try to acquire the camera exclusively. The docs also mention that default is "exclusive"
I mean this is self-explanatory.
Also I would begin trying with a basic example where you connect and acquire images and check if the buffer is empty. Last: I am also not sure if PixelFormat can be just set since you might have to set TLParamsLocked first. Just try a step-by-step approach. |
Hello MYCL94, |
Hi, New code `def main():
if name == "main": Log GenTL file found at C:/Program Files/MATRIX VISION/mvIMPACT Acquire/bin/x64/mvGenTLProducer.cti |
Hi, I just realized this is a linescan camera and you are trying to acquire an image with "TriggerMode: On", but are you sure that you do have also a valid trigger? Also check if you have set SoftwareTrigger or HardwareTrigger in your nodemap. If it is SoftwareTrigger you also need to execute the command for it etc... If it is HardwareTrigger make sure these settings are set properly. The best is to test the settings you need with Teledyne software.
|
Hi, |
Hello @MYCL94 , |
Describe the Issue
Hello.
I'm using a DALSA linea C4096-7 camera. I'm trying to acquire images but without success. Below is the code I'm using and the error.
Sample Code
`from genicam.gentl import TimeoutException
import numpy as np
from harvesters.core import Harvester
import cv2
import traceback
import os
import time
def main():
h = Harvester()
if name == "main":
main()`
Complete Traceback error:
` GenTL file found at C:/Program Files/MATRIX VISION/mvIMPACT Acquire/bin/x64/mvGenTLProducer.cti
Updating device list
Number of devices found: 1
Device: Teledyne DALSA Linea C4096-7um
D:Testes\3.9\Harvester\tt.py:35: DeprecationWarning: please consider to use create() instead of create_image_acquirer().
ia = h.create_image_acquirer(0, privilege='control')
Image acquirer created successfully
Inspecting node map...
Error setting ExposureTime: Value 997.000000 must be smaller than or equal 97.439000. : OutOfRangeException thrown in node
'ExposureTime' while calling 'ExposureTime.SetValue()' (file 'FloatT.h', line 91)
Width set to: 2048
Height set to: 300
Error setting PixelFormat: Failed to write enumeration value. Enum entry is not writable : AccessException thrown in node
'PixelFormat' while calling 'PixelFormat.FromString()' (file 'Enumeration.cpp', line 139)
Acquisition mode set to Continuous.
Trigger mode set to Off.
Starting acquisition
Acquisition status: True
Fetching buffer 1
An error occurred while fetching buffer 1: GenTL exception: Given handle does not support the operation. (Message from the source: Invalid data stream handle) (ID: -1006)
2024-11-04 22:18:56,106 :: harvesters.core :: ERROR :: GenTL exception: Given handle does not support the operation. (Message from the source: Invalid data stream handle) (ID: -1006)
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2437, in _fetch
monitor.update_event_data(self.timeout_period_on_update_event_data_call)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\genicam\gentl.py", line 1296, in update_event_data
return _gentl.EventManagerNewBuffer_update_event_data(self, timeout)
_gentl.InvalidHandleException: GenTL exception: Given handle does not support the operation. (Message from the source: Invalid data stream handle) (ID: -1006)
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\tt.py", line 97, in main
buffer = ia.fetch(timeout=5000)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2562, in fetch
buffer = self._fetch(monitor=monitor,
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2437, in _fetch
monitor.update_event_data(self.timeout_period_on_update_event_data_call)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\genicam\gentl.py", line 1296, in update_event_data
return _gentl.EventManagerNewBuffer_update_event_data(self, timeout)
_gentl.InvalidHandleException: GenTL exception: Given handle does not support the operation. (Message from the source: Invalid data stream handle) (ID: -1006)
Fetching buffer 2
An error occurred while fetching buffer 2: list index out of range
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\tt.py", line 97, in main
buffer = ia.fetch(timeout=5000)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2568, in fetch
return buffers if len(self._new_buffer_event_monitor_dict.values()) > 1 else buffers[0]
IndexError: list index out of range
Fetching buffer 3
An error occurred while fetching buffer 3: list index out of range
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\tt.py", line 97, in main
buffer = ia.fetch(timeout=5000)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2568, in fetch
return buffers if len(self._new_buffer_event_monitor_dict.values()) > 1 else buffers[0]
IndexError: list index out of range
Fetching buffer 4
An error occurred while fetching buffer 4: list index out of range
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\tt.py", line 97, in main
buffer = ia.fetch(timeout=5000)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2568, in fetch
return buffers if len(self._new_buffer_event_monitor_dict.values()) > 1 else buffers[0]
IndexError: list index out of range
Fetching buffer 5
An error occurred while fetching buffer 5: list index out of range
Traceback (most recent call last):
File "D:\Testes\3.9\Harvester\tt.py", line 97, in main
buffer = ia.fetch(timeout=5000)
File "D:\Testes\3.9\Harvester\venv39\lib\site-packages\harvesters\core.py", line 2568, in fetch
return buffers if len(self._new_buffer_event_monitor_dict.values()) > 1 else buffers[0]
IndexError: list index out of range
Stopping acquisition and destroying image acquirer
Resetting Harvester `
Configuration
The text was updated successfully, but these errors were encountered: