Skip to content
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

Sporadic Error - "Buffer is currently not delivered!" #274

Closed
marvher opened this issue Jan 31, 2022 · 4 comments
Closed

Sporadic Error - "Buffer is currently not delivered!" #274

marvher opened this issue Jan 31, 2022 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@marvher
Copy link

marvher commented Jan 31, 2022

Hello,

I have an IDS Camera IDS GV-5260CP with Genicam.
I was able to successfully write this script here. However, now sporadically an error occurs when I want to take a photo (execute the shoot_image function).

AccessDeniedException: GenTL exception: Requested operation is not allowed. (Message from the source: Buffer is currently not delivered!) (ID: -1005)

I wonder if the error is on behalf of Harvesters (@kazunarikudo), because I don't have an error with the IDS library...

Could someone help me here? Is it possible that I still have to do some steps regarding the buffer?

Thanks a lot!

class CameraController:
    def __init__(self, PATH_GENICAM_CTI, exposure_time: int = 20000):
        self.h = Harvester()
        self.h.add_file(PATH_GENICAM_CTI)
        self.h.update()

        self.ia = self.h.create_image_acquirer(0)
        self.ia.remote_device.node_map.ExposureTime.set_value(float(exposure_time))
        self.ia.start_acquisition()

    def shoot_image(self):
        with self.ia.fetch_buffer() as buffer:
            component = buffer.payload.components[0]
            data_format = component.data_format
            content = component.data.reshape(component.height, component.width).copy()
            content_bgr = cv2.cvtColor(content, cv2.COLOR_BAYER_RG2BGR)
            return content_bgr

    def close_connection(self):
        self.ia.destroy()
        self.h.reset()

error

@kazunarikudo
Copy link
Member

@marvher Hi, I am sorry for having kept you waiting. I guess I'm trying to update the chunk data even though the buffer itself is not complete. I will try to check the code and provide the fix as soon as possible. Thanks, Kazunari.

@kazunarikudo
Copy link
Member

I have just merged a branch into the master: You will never have any buffer that is incomplete hence you should not face the exception above anymore. On the other hand, please note that there is a case where the fetch_buffer method call ends up with a time-out due to incomplete buffers that float under your feet. If the fetch attempt ends up with a time-out then the method throws the genicam.gentl.TimeoutException. If you need a valid buffer anyway, please catch the exception and call the fetch_buffer method again until you get a valid buffer.

@kazunarikudo kazunarikudo added the bug Something isn't working label Feb 25, 2022
@kazunarikudo kazunarikudo added this to the 1.3.3 milestone Feb 25, 2022
@marvher
Copy link
Author

marvher commented Mar 4, 2022

Hello @kazunarikudo, no problem, thanks for your answer and explanation!
In fact, I have now done exactly the same as you suggested :)
Thanks a lot for that!

Cheers!

@kazunarikudo
Copy link
Member

@marvher Hi, thank you for the update. Keep happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants