Closed marimeireles closed 2 years ago
Odd -- I see this too, but I didn't a few weeks ago (at least I don't think I did).
@martinRenou any suggestions?
FYI, I think all of the failures are due to the Custom scatter p[lot
cell -- if I skip that then everything subsequent to that works.
Testing with ipywidgets 7.7 and ipycanvas 0.12.0.
This may be a bug in ipycanvas. But looks like there's an easy workaround - that plot works for me after pip install orjson
.
The function breaking has two branches https://github.com/martinRenou/ipycanvas/blob/7c6fc1f63205566e287ebb9552a2b2be0b7b05cc/ipycanvas/utils.py#L63-L75 and I guess orjson is more robust.
Will test later tonight. Thank you guys! :D
Please ping me if it works -- I'll add orjson to the install instructions if it works.
Thanks @ianhi! That did the trick @mwcraig if you can, please add it to the instructions =) And we can close this one.
I'm getting
TypeError: Object of type int64 is not JSON serializable
In line
plot = ScatterPlot(x, y, sizes, colors, branca.colormap.linear.viridis, stroke_color='white')
From the ipycanvas example.
I've tried converting all the
np
arrays to a python type using:But getting the exact same error. Really no clue what's going on here.
Doesn't seem like it's a regression from
branca
the plotting tool, as I've tested with earlier versions. Is this a known issue with a newipywidgets
version?