# Interact slider, clear cell output question; WebIO problem?

**URL:** <https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [January 26, 2020, 11:06pm UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826 "2020-01-26T23:06:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [January 26, 2020, 11:06pm UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/1 "2020-01-26T23:06:58Z")

</div>

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:

```julia
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…

---

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [January 27, 2020, 5:37am UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/2 "2020-01-27T05:37:33Z")

</div>

I got a little further: the browser console output  
has an error message:  
`Error: Cannot send 2 comm.js:112:18`  
when I move the slider  
​

---

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [January 27, 2020, 1:19pm UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/3 "2020-01-27T13:19:18Z")

</div>

I tried to reinstall the jupyter webio extension.  
the log for `WebIO.install_jupyter_labextension()`  
is

```julia
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

```

Any suggestions?

---

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [January 27, 2020, 8:03pm UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/4 "2020-01-27T20:03:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [January 28, 2020, 9:38pm UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/5 "2020-01-28T21:38:41Z")

</div>

Sort of solved the issue: managed to reinstall WebIO (needed to make a fix in the code).

The code snippet in the original post now works in chromium,  
but not in firefox…

---

<div class="post-metadata">

**Author:** ![ea42gh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ea42gh/32/12000_2.png) [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Post date:** [February 2, 2020, 12:46am UTC](https://discourse.julialang.org/t/interact-slider-clear-cell-output-question-webio-problem/33826/6 "2020-02-02T00:46:09Z")

</div>

There is an initialization issue for WebIO of some sort.  
I opened issue #386 on [JuliaGizmos](https://github.com/JuliaGizmos)/ **[WebIO.jl](https://github.com/JuliaGizmos/WebIO.jl)**

Reloading the notebook in the browser to reestablish comms fixes the problem.  
It appears to be tied to restarting the IJulia kernel
