diff --git a/gstlal/python/stream.py b/gstlal/python/stream.py index e3a51dc0005707980f7263513713904e71e7884d..285975dca66ab60339e96b179530ef8c970f0b46 100644 --- a/gstlal/python/stream.py +++ b/gstlal/python/stream.py @@ -374,7 +374,12 @@ class Stream(ElementRegistry): success, mapinfo = memory.map(Gst.MapFlags.READ) assert success if mapinfo.data: - rows = cls._caps_buffer_map[caps.to_string()](mapinfo.data) + # FIXME: gst-python 1.18 returns a memoryview + # instead of a read-only bytes-like object, so + # cast to bytes. this is likely inefficient but + # a proper solution will require .from_buffer() + # to leverage the buffer protocol instead + rows = cls._caps_buffer_map[caps.to_string()](bytes(mapinfo.data)) data.extend(rows) memory.unmap(mapinfo)