Description
Hello,
We are sporadically getting null values in the following code from TIS.py:
sample = self.appsink.emit("try-pull-sample", timeout * Gst.SECOND) buf = sample.get_buffer() data = buf.extract_dup(0, buf.get_size()) if convert_to_mat and sample is not None: try: self.img_mat = self.__convert_to_numpy(data, sample.get_caps()) except RuntimeError: # unsuported format to convert to mat # ignored to keep compatibility to old sample code pass
Error message:
"TIS.py", line 170, in snap_image
buf = sample.get_buffer()
AttributeError: 'NoneType' object has no attribute 'get_buffer'
I´am guessing the timeout runs out and sample becomes null.
The issue seem to happen after we have used the script and then closed it down. A reboot of the computer seem to be the only way to solve the problem.
We did not encounter this problem on ubuntu 16.04 but now with 20.04 it happens very often and stops our clients from using the cameras in their systems.
It usually happens after a few images have been taken. Any pointers of what could be wrong?
Is there any granular logs produced that could point us in the right direction?
Cameras are DFK 33UX183 and DFK 33UX250.
Regards