Serialization Error has been more frequent than ever when adding threadpool. Adding --num-threads
is very important to me as users would be waiting for each other’s programming steps to be executed.
Oct 08 06:12:49 python3[58918]: 2024-10-08 06:12:49,663 Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <torn ado.platform.asyncio.AsyncIOMainLoop object at 0x7f18108f0730>>, <Task finished name='Task-48264' coro=<async_execute.<locals>.wrapper() done, defined at /usr /lib/python3/dist-packages/panel/io/server.py:179> exception=SerializationError("can't serialize <class 'bokeh.document.events.SessionCallbackAdded'>")>)
Oct 08 06:12:49 python3[58918]: Traceback (most recent call last):
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/document.py", line 340, in unlocked
Oct 08 06:12:49 python3[58918]: curdoc.unhold()
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/document.py", line 776, in unhold
Oct 08 06:12:49 python3[58918]: self.callbacks.unhold()
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 431, in unhold
Oct 08 06:12:49 python3[58918]: self.trigger_on_change(event)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 413, in trigger_on_change
Oct 08 06:12:49 python3[58918]: invoke_with_curdoc(doc, invoke_callbacks)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 443, in invoke_with_curdoc
Oct 08 06:12:49 python3[58918]: return f()
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 412, in invoke_callbacks
Oct 08 06:12:49 python3[58918]: cb(event)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 276, in <lambda>
Oct 08 06:12:49 python3[58918]: self._change_callbacks[receiver] = lambda event: event.dispatch(receiver)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/events.py", line 353, in dispatch
Oct 08 06:12:49 python3[58918]: super().dispatch(receiver)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/events.py", line 219, in dispatch
Oct 08 06:12:49 python3[58918]: cast(DocumentPatchedMixin, receiver)._document_patched(self)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/server/session.py", line 244, in _document_patched
Oct 08 06:12:49 python3[58918]: raise RuntimeError("_pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes")
Oct 08 06:12:49 python3[58918]: RuntimeError: _pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes
Oct 08 06:12:49 python3[58918]: During handling of the above exception, another exception occurred:
Oct 08 06:12:49 python3[58918]: Traceback (most recent call last):
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/tornado/ioloop.py", line 740, in _run_callback
Oct 08 06:12:49 python3[58918]: ret = callback()
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/tornado/ioloop.py", line 764, in _discard_future_result
Oct 08 06:12:49 python3[58918]: future.result()
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/server.py", line 185, in wrapper
Oct 08 06:12:49 python3[58918]: state._handle_exception(e)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/state.py", line 442, in _handle_exception
Oct 08 06:12:49 python3[58918]: raise exception
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/server.py", line 183, in wrapper
Oct 08 06:12:49 python3[58918]: return await func(*args, **kw)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/depends.py", line 37, in _depends
Oct 08 06:12:49 python3[58918]: return await func(*args, **kw)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/reactive.py", line 426, in wrapped
Oct 08 06:12:49 python3[58918]: return await evaled
Oct 08 06:12:49 python3[58918]: File "/var/www/dip-v01.04.00/app.py", line 286, in show_dashboard
Oct 08 06:12:49 python3[58918]: main_layout[0] = loading_page
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/layout/base.py", line 409, in __setitem__
Oct 08 06:12:49 python3[58918]: self.objects = new_objects
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 525, in _f
Oct 08 06:12:49 python3[58918]: instance_param.__set__(obj, val)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 527, in _f
Oct 08 06:12:49 python3[58918]: return f(self, obj, val)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 1545, in __set__
Oct 08 06:12:49 python3[58918]: obj.param._call_watcher(watcher, event)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 2486, in _call_watcher
Oct 08 06:12:49 python3[58918]: self_._execute_watcher(watcher, (event,))
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 2468, in _execute_watcher
Oct 08 06:12:49 python3[58918]: watcher.fn(*args, **kwargs)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/reactive.py", line 374, in _param_change
Oct 08 06:12:49 python3[58918]: self._apply_update(named_events, properties, model, ref)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/reactive.py", line 301, in _apply_update
Oct 08 06:12:49 python3[58918]: with unlocked():
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3.10/contextlib.py", line 142, in __exit__
Oct 08 06:12:49 python3[58918]: next(self.gen)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/document.py", line 350, in unlocked
Oct 08 06:12:49 python3[58918]: msgs[conn] = conn.protocol.create('PATCH-DOC', remaining_events)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/protocol/_init__.py", line 131, in create
Oct 08 06:12:49 python3[58918]: return self._messages[msgtype].create(*args, **kwargs) # type: ignore [attr-defined]
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/protocol/messages/patch_doc.py", line 90, in create
Oct 08 06:12:49 python3[58918]: patch_json = PatchJson(events=serializer.encode(events))
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 252, in encode
Oct 08 06:12:49 python3[58918]: return self._encode(obj)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 277, in _encode
Oct 08 06:12:49 python3[58918]: return self._encode_list(obj)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 323, in _encode_list
Oct 08 06:12:49 python3[58918]: return [self.encode(item) for item in obj]
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 323, in <listcomp>
Oct 08 06:12:49 python3[58918]: return [self.encode(item) for item in obj]
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 252, in encode
Oct 08 06:12:49 python3[58918]: return self._encode(obj)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 296, in _encode
Oct 08 06:12:49 python3[58918]: return self._encode_other(obj)
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 469, in _encode_other
Oct 08 06:12:49 python3[58918]: self.error(f"can't serialize {type(obj)}")
Oct 08 06:12:49 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 472, in error
Oct 08 06:12:49 python3[58918]: raise SerializationError(message)
Oct 08 06:12:49 python3[58918]: bokeh.core.serialization.SerializationError: can't serialize <class 'bokeh.document.events.SessionCallbackAdded'>
Oct 08 06:12:49 python3[58918]: 2024-10-08 06:12:49,723 WebSocket connection closed: code=None, reason=None
Oct 08 06:13:36 python3[58918]: 2024-10-08 06:13:36,380 Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <torn ado.platform.asyncio.AsyncIOMainLoop object at 0x7f18108f0730>>, <Task finished name='Task-49216' coro=<async_execute.<locals>.wrapper() done, defined at /usr /lib/python3/dist-packages/panel/io/server.py:179> exception=SerializationError("can't serialize <class 'bokeh.document.events.SessionCallbackAdded'>")>)
Oct 08 06:13:36 python3[58918]: Traceback (most recent call last):
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/document.py", line 340, in unlocked
Oct 08 06:13:36 python3[58918]: curdoc.unhold()
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/document.py", line 776, in unhold
Oct 08 06:13:36 python3[58918]: self.callbacks.unhold()
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 431, in unhold
Oct 08 06:13:36 python3[58918]: self.trigger_on_change(event)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 413, in trigger_on_change
Oct 08 06:13:36 python3[58918]: invoke_with_curdoc(doc, invoke_callbacks)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 443, in invoke_with_curdoc
Oct 08 06:13:36 python3[58918]: return f()
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 412, in invoke_callbacks
Oct 08 06:13:36 python3[58918]: cb(event)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/callbacks.py", line 276, in <lambda>
Oct 08 06:13:36 python3[58918]: self._change_callbacks[receiver] = lambda event: event.dispatch(receiver)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/events.py", line 353, in dispatch
Oct 08 06:13:36 python3[58918]: super().dispatch(receiver)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/document/events.py", line 219, in dispatch
Oct 08 06:13:36 python3[58918]: cast(DocumentPatchedMixin, receiver)._document_patched(self)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/server/session.py", line 244, in _document_patched
Oct 08 06:13:36 python3[58918]: raise RuntimeError("_pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes")
Oct 08 06:13:36 python3[58918]: RuntimeError: _pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes
Oct 08 06:13:36 python3[58918]: During handling of the above exception, another exception occurred:
Oct 08 06:13:36 python3[58918]: Traceback (most recent call last):
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/tornado/ioloop.py", line 740, in _run_callback
Oct 08 06:13:36 python3[58918]: ret = callback()
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/tornado/ioloop.py", line 764, in _discard_future_result
Oct 08 06:13:36 python3[58918]: future.result()
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/server.py", line 185, in wrapper
Oct 08 06:13:36 python3[58918]: state._handle_exception(e)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/state.py", line 442, in _handle_exception
Oct 08 06:13:36 python3[58918]: raise exception
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/server.py", line 183, in wrapper
Oct 08 06:13:36 python3[58918]: return await func(*args, **kw)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/depends.py", line 37, in _depends
Oct 08 06:13:36 python3[58918]: return await func(*args, **kw)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/reactive.py", line 426, in wrapped
Oct 08 06:13:36 python3[58918]: return await evaled
Oct 08 06:13:36 python3[58918]: File "/var/www/dip-v01.04.00/app.py", line 285, in show_dashboard
Oct 08 06:13:36 python3[58918]: button_color_dict(dashboard_key)
Oct 08 06:13:36 python3[58918]: File "/var/www/dip-v01.04.00/app.py", line 224, in button_color_dict
Oct 08 06:13:36 python3[58918]: button_dict[key].stylesheets = [sidebar_btn_text_css,sidebar_btn_text_css_hover,line_height_group]
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 525, in _f
Oct 08 06:13:36 python3[58918]: instance_param.__set__(obj, val)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 527, in _f
Oct 08 06:13:36 python3[58918]: return f(self, obj, val)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 1545, in __set__
Oct 08 06:13:36 python3[58918]: obj.param._call_watcher(watcher, event)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 2486, in _call_watcher
Oct 08 06:13:36 python3[58918]: self_._execute_watcher(watcher, (event,))
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/param/parameterized.py", line 2468, in _execute_watcher
Oct 08 06:13:36 python3[58918]: watcher.fn(*args, **kwargs)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/reactive.py", line 374, in _param_change
Oct 08 06:13:36 python3[58918]: self._apply_update(named_events, properties, model, ref)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/reactive.py", line 301, in _apply_update
Oct 08 06:13:36 python3[58918]: with unlocked():
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3.10/contextlib.py", line 142, in __exit__
Oct 08 06:13:36 python3[58918]: next(self.gen)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/panel/io/document.py", line 350, in unlocked
Oct 08 06:13:36 python3[58918]: msgs[conn] = conn.protocol.create('PATCH-DOC', remaining_events)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/protocol/__init__.py", line 131, in create
Oct 08 06:13:36 python3[58918]: return self._messages[msgtype].create(*args, **kwargs) # type: ignore [attr-defined]
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/protocol/messages/patch_doc.py", line 90, in create
Oct 08 06:13:36 python3[58918]: patch_json = PatchJson(events=serializer.encode(events))
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 252, in encode
Oct 08 06:13:36 python3[58918]: return self._encode(obj)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 277, in _encode
Oct 08 06:13:36 python3[58918]: return self._encode_list(obj)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 323, in _encode_list
Oct 08 06:13:36 python3[58918]: return [self.encode(item) for item in obj]
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 323, in <listcomp>
Oct 08 06:13:36 python3[58918]: return [self.encode(item) for item in obj]
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 252, in encode
Oct 08 06:13:36 python3[58918]: return self._encode(obj)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 296, in _encode
Oct 08 06:13:36 python3[58918]: return self._encode_other(obj)
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 469, in _encode_other
Oct 08 06:13:36 python3[58918]: self.error(f"can't serialize {type(obj)}")
Oct 08 06:13:36 python3[58918]: File "/usr/lib/python3/dist-packages/bokeh/core/serialization.py", line 472, in error
Oct 08 06:13:36 python3[58918]: raise SerializationError(message)
Oct 08 06:13:36 python3[58918]: bokeh.core.serialization.SerializationError: can't serialize <class 'bokeh.document.events.SessionCallbackAdded'>