☰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

SerializationError("can't serialize <class 'range'>")

Community Supportserverbokeh
swamilikes2code
swamilikes2code

Hello Community,

We have been hosting STEM educational modules and we haven’t had any issues with bokeh server till we updated bokeh. We had updated our server to bokeh 3.1.0 from bokeh 2.3.x, and one of the learning module is not working. We were able to successfully transition other learning modules/bokeh servers to the bokeh version 3.1.0.

We fixed minor changes of how Tab module name has changed etc. For one of the STEM learning modules we are getting the Serialization error. Unable to figure what is causing the issue, since the error message is pointing to bokeh modules and not to the code written by us. Any idea or pointers on how to determine the root cause of this issue? Have never encountered this previously and do not know how to go about fixing this issue.

The code we are trying to run(which was previously running using older bokeh version 2.3.x): https://github.com/swamilikes2code/Python_based_Interactive_Scientific_Visualization/blob/fix-tab-panel-bug-catalysis/catalysis_visualization/catalysis_data_interactive_visualization.py

Here is the screenshot of the error message:

Thank you for taking your time!

⌁   Link to post
Bryan
Bryan

Bokeh won’t “concretize” lazy generators like range (it’s not always the right thing to do, e.g. generators can be infinite—we won’t assume). You will have to create an actual tuple, list, or array from the range yourself.

⌁   Link to post

End of archived discussion · Replies are disabled