philippjfr on master
Adjust code cell color (compare)
philippjfr on master
Minor documentation fixes (compare)
Has anyone else seen this bug?
VM10348:52 Python failed with the following traceback: /Users/kcp/.conda/envs/lbm/lib/python3.8/site-packages/pyviz_comms/__init__.py _handle_msg L316 /Users/kcp/.conda/envs/lbm/lib/python3.8/site-packages/holoviews/plotting/bokeh/callbacks.py on_msg L146 /Users/kcp/.conda/envs/lbm/lib/python3.8/site-packages/holoviews/plotting/bokeh/callbacks.py _process_msg L1203 /Users/kcp/.conda/envs/lbm/lib/python3.8/site-packages/holoviews/plotting/bokeh/callbacks.py <listcomp> L1203 ValueError: invalid literal for int() with base 10: 'dtype'
It's cropped up in my code this week. I thought I had it narrowed down and reported it here holoviz/holoviews#4626 but now I noticed it on a completely different plot unrelated to annotators.
I'm dealing with a memory leak from
hv.RGB. I've traced it back to the matplotlib backend (even though I'm running hv with the bokeh backend). It's possibly related to this mpl issue matplotlib/matplotlib#8519 . It may be related to this issue as well which has been labeled a bug holoviz/hvplot#501 .
Is there a workaround for NOT using mpl as the backend for hv.RGB?
This is the tracemalloc:
[ Top 10 ] /Users/kcp/miniconda3/envs/lbm/lib/python3.8/site-packages/matplotlib/image.py:1663: size=402 MiB, count=6, average=66.9 MiB /Users/kcp/miniconda3/envs/lbm/lib/python3.8/posixpath.py:368: size=445 KiB, count=3417, average=133 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/linecache.py:137: size=336 KiB, count=3244, average=106 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/inspect.py:753: size=144 KiB, count=1, average=144 KiB /Users/kcp/miniconda3/envs/lbm/lib/python3.8/inspect.py:750: size=144 KiB, count=1, average=144 KiB /Users/kcp/miniconda3/envs/lbm/lib/python3.8/site-packages/IPython/core/builtin_trap.py:63: size=9248 B, count=1, average=9248 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/site-packages/IPython/core/compilerop.py:101: size=5446 B, count=96, average=57 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/json/decoder.py:353: size=3479 B, count=44, average=79 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/site-packages/param/parameterized.py:271: size=2184 B, count=13, average=168 B /Users/kcp/miniconda3/envs/lbm/lib/python3.8/site-packages/tornado/gen.py:191: size=2088 B, count=8, average=261 B
With the bokeh ext loaded
Use this instead:
f = open(filename, 'rb') image = Image.open(f) image.load() f.close()
Pillow is leaking the file pointer
with open(filename, 'rb') as: image = np.array(Image.open(f))
FYI. I've tried out the https://shoelace.style/ web component library to create a Panel Template with a modal/ dialog to answer this user question https://discourse.holoviz.org/t/can-i-use-create-a-modal-dialog-in-panel/1207/4. It worked really well. For me Shoelace is currently the library of web components that I believe complements the existing Bokeh/ Panel widgets the most. They seem fairly mature and extensive. So if you needs some advanced layouts for your template take a look at them.
I believe a lot in Fast web components as well. But they are not so mature. But eventually they could be much, much bigger as they have the backing of Microsoft. And people are just starring it on Github and joining their discord forum at amazing speeds.