AravisProject / aravis

A vision library for genicam based cameras
GNU Lesser General Public License v2.1
840 stars 316 forks source link

ValueError: Pointer arguments are restricted to integers, capsules, and None. See: https://bugzilla.gnome.org/show_bug.cgi?id=683599 #906

Open hk-du opened 3 weeks ago

hk-du commented 3 weeks ago

Describe the bug Creating a preallocated buffer in python throws the above error

To Reproduce import gi, numpy gi.require_version('Aravis','0.8') from gi.repository import Aravis,

fake_array = numpy.arange(1,17, dtype= numpy.uint16).reshape((4,4)) fake_buffer = Aravis.Buffer.new(fake_array.nbytes, fake_array.flatten().tobytes())

Expected behavior I expected to have an Aravis.Buffer reference to be created

Camera description:

Platform description:

Additional context Trying in python to create an Aravis Buffer which is already preallocated and populated with fake values like above. The context is to push this buffer into a stream, start acquiring with a fake camera, and see if the values can be correctly read out once the buffer is poped.

EmmanuelP commented 2 weeks ago

Thanks for the report.

Could you please attach a simple python script that shows the issue ?