I want to update the output in a jupyter cell based on a slider, but need to clear the cell as I go.
Something like:
l = collect(1:10) # simplistic: actual code has a list of PrettyTables
N_steps = length(l)
step_ctrl = slider(1:N_steps, label="Step")
function show_l(i)
IJulia.clear_output(true)
display.([step_ctrl, l[1:i]])
end
Interact.@on show_l( &step_ctrl )
step_ctrl[] = 1
How would I need to modify the above code to get it to work?
The topics and stackoverflow results give hints, but…
I tried to reinstall the jupyter webio extension.
the log for WebIO.install_jupyter_labextension()
is
Yarn configuration loaded.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/labextensions.py", line 93, in start
ans = self.run_task()
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/labextensions.py", line 210, in run_task
for arg in self.extra_args
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/labextensions.py", line 210, in <listcomp>
for arg in self.extra_args
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/commands.py", line 535, in unlink_package
return handler.unlink_package(package)
File "/usr/local/lib/python3.7/dist-packages/jupyterlab/commands.py", line 955, in unlink_package
raise ValueError('No linked package for %s' % path)
ValueError: No linked package for @webio/webio
Exiting application: jupyter
could somebody tell me whether the above code snippet works for them?
I.e., do I look at fixing the code, or do I have a problem with my software installation?