☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

RuntimeError: dictionary changed size during iteration

Community Support
Reuben_Jacobs
Reuben_Jacobs

Hi,

I just changed my Flask server to serve multiple bokeh plots by using multiple requests from the front end to the back end. I.E. if there is 6 plots to load I make 6 request all on DOM ready.

RuntimeError: dictionary changed size during iteration

``

The idea here is that I can send out 6 requests at the same time and some might finish before others thus (placing each plot on the page as soon as ready) saving me some time. The server used to load all of the plots in one method and make the front end wait until it they were all done done. However, I am now getting this error:

This error occurs on this execution of built in bokeh functionality

mpl.to_bokeh()

``

Has anyone seen this before?

Thanks.

⌁   Link to post
Bryan
Bryan

For this kind of operation, you will probably have to create and manage bokeh Documents explicitly, instead of relying on the (single) implicit "current document". You can see examples of this in the examples/models directory of the GH repo. Note thi is just speculation, without a minimal test case to run or examine its hard to say anything more.

Also please note: both the third-part projects mpld3 and mplexporter (which bokeh uses to provide partial mpl compat) are currently unmaintained and unsupported. As a result Bokeh MPL support is fragile, at best. I strongly recommend using native Bokeh APIs (e.g. bokeh.plotting) whenever possible.

Thanks,

Bryan

···

On Aug 22, 2016, at 3:12 PM, Reuben Jacobs <reuben.jacobs1@gmail.com> wrote:

Hi,

I just changed my Flask server to serve multiple bokeh plots by using multiple requests from the front end to the back end. I.E. if there is 6 plots to load I make 6 request all on DOM ready.

The idea here is that I can send out 6 requests at the same time and some might finish before others thus (placing each plot on the page as soon as ready) saving me some time. The server used to load all of the plots in one method and make the front end wait until it they were all done done. However, I am now getting this error:

RuntimeError: dictionary changed size during iteration

This error occurs on this execution of built in bokeh functionality

mpl.to_bokeh()

Has anyone seen this before?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2e3b23a2-ed46-4132-880b-695aeed969dd%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Reuben_Jacobs
Reuben_Jacobs

Is there an appropriate way to create a violin plot from a complex dataframe without using seaborn and mpl.to_bokeh() ?

···

On Mon, Aug 22, 2016 at 4:19 PM, Bryan Van de Ven bryan@bokeh.org wrote:

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

For this kind of operation, you will probably have to create and manage bokeh Documents explicitly, instead of relying on the (single) implicit “current document”. You can see examples of this in the examples/models directory of the GH repo. Note thi is just speculation, without a minimal test case to run or examine its hard to say anything more.

Also please note: both the third-part projects mpld3 and mplexporter (which bokeh uses to provide partial mpl compat) are currently unmaintained and unsupported. As a result Bokeh MPL support is fragile, at best. I strongly recommend using native Bokeh APIs (e.g. bokeh.plotting) whenever possible.

Thanks,

Bryan

On Aug 22, 2016, at 3:12 PM, Reuben Jacobs reuben.jacobs1@gmail.com wrote:

Hi,

I just changed my Flask server to serve multiple bokeh plots by using multiple requests from the front end to the back end. I.E. if there is 6 plots to load I make 6 request all on DOM ready.

The idea here is that I can send out 6 requests at the same time and some might finish before others thus (placing each plot on the page as soon as ready) saving me some time. The server used to load all of the plots in one method and make the front end wait until it they were all done done. However, I am now getting this error:

RuntimeError: dictionary changed size during iteration

This error occurs on this execution of built in bokeh functionality

mpl.to_bokeh()

Has anyone seen this before?

Thanks.

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2e3b23a2-ed46-4132-880b-695aeed969dd%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/Oi75387NO6Q/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/521E5592-504C-4F72-960D-5EF6A968F2C3%40continuum.io.

⌁   Link to post
Bryan
Bryan

There is no built-in high level chart for Violin plots. I would love to see bokeh.charts.Violin added, but given how thin the core team is currently stretched, realistically that will require an interested and enthusiastic new contributor. Currently for this, you'd had to draw the chart yourself, using the patch or patches glyhp methods, and computing all the derived coordinates necessary for them from the source data.

Thanks,

Bryan

···

On Aug 23, 2016, at 9:16 AM, Reuben Jacobs <reuben.jacobs1@gmail.com> wrote:

Is there an appropriate way to create a violin plot from a complex dataframe without using seaborn and mpl.to_bokeh() ?

On Mon, Aug 22, 2016 at 4:19 PM, Bryan Van de Ven <bryan@bokeh.org> wrote:
For this kind of operation, you will probably have to create and manage bokeh Documents explicitly, instead of relying on the (single) implicit "current document". You can see examples of this in the examples/models directory of the GH repo. Note thi is just speculation, without a minimal test case to run or examine its hard to say anything more.

Also please note: both the third-part projects mpld3 and mplexporter (which bokeh uses to provide partial mpl compat) are currently unmaintained and unsupported. As a result Bokeh MPL support is fragile, at best. I strongly recommend using native Bokeh APIs (e.g. bokeh.plotting) whenever possible.

Thanks,

Bryan

> On Aug 22, 2016, at 3:12 PM, Reuben Jacobs <reuben.jacobs1@gmail.com> wrote:
>
> Hi,
>
> I just changed my Flask server to serve multiple bokeh plots by using multiple requests from the front end to the back end. I.E. if there is 6 plots to load I make 6 request all on DOM ready.
>
> The idea here is that I can send out 6 requests at the same time and some might finish before others thus (placing each plot on the page as soon as ready) saving me some time. The server used to load all of the plots in one method and make the front end wait until it they were all done done. However, I am now getting this error:
>
> RuntimeError: dictionary changed size during iteration
>
> This error occurs on this execution of built in bokeh functionality
>
> mpl.to_bokeh()
>
> Has anyone seen this before?
>
> Thanks.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
> To post to this group, send email to bokeh@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2e3b23a2-ed46-4132-880b-695aeed969dd%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/Oi75387NO6Q/unsubscribe\.
To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/521E5592-504C-4F72-960D-5EF6A968F2C3%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAOTdnhG3i6TxnmwKUwBxaF4JbD4XJeehdenxZt-4%2BwWANSfaJQ%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled