0

I was trying to make my notebook run in the Nb-viewer with the interaction feature.

I was following this reference : https://ipywidgets.readthedocs.io/en/latest/embedding.html#save-notebook-widget-state

This is the link of my code : https://gist.github.com/Pabla007/408e02b9a646d89fdf98e6e3615afd1b

This is my error screenshot : enter image description here

This is the Output that i am getting without interaction Due to this error the data is not linked with the output and as a result it is not rendered. enter image description here

Rocky_Mental
  • 148
  • 1
  • 2
  • 12
  • [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Avi Meltser Jun 10 '19 at 12:39
  • And there is no good or bad question there is only doubt that you have to clear. No matter it is small or big. Which question you want to ask specify the language , framework , Os , error and describe the problem as much as you can. But put it simple but informative if anyone see that he should easily understand that what are you trying to ask. – Rocky_Mental Jun 11 '19 at 02:07

1 Answers1

0

The issue seems to be that you have included { in the HTML template. The code you are using uses python string formatting, where {varname} indicates a variable insertion. The simplest solution will simply be to escape the {} brackets.

Vidar
  • 1,777
  • 1
  • 11
  • 15
  • Can you tell me where in the code to do that. Can you highlight that section so that i could do that and try :) And thxs for answering. – Rocky_Mental Jun 13 '19 at 12:07
  • In the variable called `html_template`. I would really recommend not to pre-populate that variable with anything tough, and instead use the code in the ipywidgets example as it is, until you get it working. – Vidar Jun 13 '19 at 18:06
  • Ok i will try it and let you know that if it works or not :) – Rocky_Mental Jun 14 '19 at 13:10