Skip to content

Commit

Permalink
fix: wrong offset when memoryview format is non-byte
Browse files Browse the repository at this point in the history
the offset should be in bytes, not elements. See also bokeh/ipywidgets_bokeh#46 (comment)
  • Loading branch information
maartenbreddels authored Feb 20, 2022
1 parent c8c620b commit 80a3b8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panel/io/ipywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def send(self, stream, msg_type, content=None, parent=None, ident=None, buffers=
offsets = [start]

for buffer in buffers[:-1]:
start += len(buffer)
start += memoryview(buffer).nbytes
offsets.append(start)

u32 = lambda n: n.to_bytes(4, "big")
Expand Down

0 comments on commit 80a3b8d

Please sign in to comment.