Error rendering Bokeh model

Hello,

I’m very new to Bokeh, and i am trying to embed a list of plots in an HTML file, but I keep getting this error message:

Bokeh Error

Error rendering Bokeh model: could not find tag with id: 1e4560f3-2792-47eb-9016-34c1a2cd7738

The id number changes each time the code is run. I'm using script, div = components(paramPlots) to get the script and div values. 'paramPlots' is a list of bokeh plots.

Here is the code of the HTML file:

  <!DOCTYPE html>
<html lang="en">
<head>
<title>Parameter "{{ paramName }}" Plots</title>
<meta charset="utf-8" http-equiv="refresh">
<link rel="stylesheet" href="http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css" type="text/css" />
<script type="text/javascript" src="http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.js"></script>
{{ script|safe }}
</head>
<body>
<table>
<tr>
<td class="ColumnHeader">{{ paramName }}</td>
</tr>
</table>
{% if div|length > 1 %}
<div class="embed-wrapper">
{{ div[key] }}
</div>
{% else %}
{{ div|safe }}
{% endif %}
</body>
</html>

There are no errors when there's just one plot in the list, but the error occurs when there is more than one. I would appreciate any help to solve this problem.

So after looking more closely at my code, I realized I was missing a for loop in my code. Everything works fine now with the new code below:

Parameter "{{ paramName }}" Plots

{{ script|safe }}

{{ paramName }}

{% if div|length > 1 %}

{% for d in div %}

{{ d|safe }}

{% endfor %}

{% else %}

{{ div|safe }}

{% endif %}

···

On Friday, May 26, 2017 at 10:42:17 AM UTC-7, S Bengali wrote:

Hello,

I’m very new to Bokeh, and i am trying to embed a list of plots in an HTML file, but I keep getting this error message:

Bokeh Error

Error rendering Bokeh model: could not find tag with id: 1e4560f3-2792-47eb-9016-34c1a2cd7738


The id number changes each time the code is run. I'm using script, div = components(paramPlots) to get the script and div values. 'paramPlots' is a list of bokeh plots.


Here is the code of the HTML file:


  <!DOCTYPE html>
<html lang="en">
<head>
<title>Parameter "{{ paramName }}" Plots</title>
<meta charset="utf-8" http-equiv="refresh">
<link rel="stylesheet" href="[http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css](http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css)  " type="text/css" />
<script type="text/javascript" src="[http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.js](http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.js)  "></script>
{{ script|safe }}
</head>
<body>
<table>
<tr>
<td class="ColumnHeader">{{ paramName }}</td>
</tr>
</table>
{% if div|length > 1 %}
<div class="embed-wrapper">
{{ div[key] }}
</div>
{% else %}
{{ div|safe }}
{% endif %}
</body>
</html>


There are no errors when there's just one plot in the list, but the error occurs when there is more than one. I would appreciate any help to solve this problem.