fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

Adding `@bind`ed PlutoUI variable caused a notebook error, I cannot load the notebook anymore #2785

Closed emsal0 closed 5 months ago

emsal0 commented 5 months ago

I apologize, I don't know how to retrace my steps to recover my notebook so I can't provide a video recording.

Gist with relevant files is at https://gist.github.com/emsal0/3f4ade444ef0c6aa835eb1944832f1e1.

I was using Pluto with PlutoUI and already had a few @binded variables, which worked fine. I then did the following:

. Added two cells, one with a @bind variable t (slider) and a Plot(U[:,t]).

. Mistakenly ran the second cell before the UI variable t could be created

. Attempted to run the first added cell.

These two cells in question could be found at the bottom of the diffusion_forward_notebook.jl file in the attached gist.

After that, my notebook bricked. It's a MethodError too (no such @bind - ) so that was quite strange. A copy of the trace is in the error_trace.txt file in the gist.

fonsp commented 5 months ago

Thanks for the report! The notebook can no longer be opened because of the statement:

@bind t Slider (1:T)
image

@emsal0 If you change this code to

@bind t Slider(1:T)

in the file, then it will open again in Pluto