question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deserialization warning with Bokeh 2.1

See original GitHub issue

The dashboard broke under 2.1. It has been resolved in #3904

However, we’re still getting a deserialization error like the following:

 message: Message 'PATCH-DOC' content: {'references': [], 'events': [{'kind': 'ModelChanged', 'model': {'id': '1683'}, 'attr': 'text_align', 'new': {'value': 'right'}}, {'kind': 'ModelChanged', 'model': {'id': '1684'}, 'attr': 'text_align', 'new': {'value': 'right'}}, {'kind': 'ModelChanged', 'model': {'id': '1628'}, 'attr': 'reset_start', 'new': -8}, {'kind': 'ModelChanged', 'model': {'id': '1628'}, 'attr': 'reset_end', 'new': 0}]} 
 error: DeserializationError("Enum('left', 'right', 'center') expected str, got {'value': 'right'} of type dict")
Traceback (most recent call last):
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/server/protocol_handler.py", line 90, in handle
    work = await handler(message, connection)
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/server/session.py", line 67, in _needs_document_lock_wrapper
    result = func(self, *args, **kwargs)
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/server/session.py", line 261, in _handle_patch
    message.apply_to_document(self.document, self)
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in apply_to_document
    doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/document/document.py", line 1150, in _with_self_as_curdoc
    return f()
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in <lambda>
    doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/document/document.py", line 411, in apply_json_patch
    patched_obj.set_from_json(attr, value, models=references, setter=setter)
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/core/has_props.py", line 341, in set_from_json
    descriptor.set_from_json(self, json, models, setter)
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/core/property/descriptors.py", line 611, in set_from_json
    self.property.from_json(json, models),
  File "/home/mrocklin/miniconda/envs/test-3714/lib/python3.8/site-packages/bokeh/core/property/bases.py", line 463, in from_json
    raise DeserializationError("%s expected %s, got %s of type %s" % (self, expected, json, type(json).__name__))
bokeh.core.property.bases.DeserializationError: Enum('left', 'right', 'center') expected str, got {'value': 'right'} of type dict

This comes about from the TaskProgress plot available here:

https://github.com/dask/distributed/blob/1d7640b0172febf9ceef37c2c31241c66ac165eb/distributed/dashboard/components/scheduler.py#L1488-L1662

cc @bryevdv @jsignell

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
mrocklincommented, Jun 16, 2020

It’s ok, you all make a mean omelet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bokeh.core.serialization — Bokeh 3.0.3rc1 Documentation
Source code for bokeh.core.serialization ... obj: int) -> AnyRep: if -_MAX_SAFE_INT < obj <= _MAX_SAFE_INT: return obj else: log.warning("out of range ...
Read more >
Releases — HoloViews v1.15.3
Fixed deserialization of polygon/multi_line CDS data in bokeh backend (#4631). Enhancements: Refactor of link selections streams (#4572). Add ability to listen ...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Versions: 2.1.4; Build Dependencies: cmake, ninja; Description: A collection of codes for the generation of multi-parton processes in hadronic collisions.
Read more >
Releases — Panel v0.14.2a6
Do not sync DataFrame widget sorters parameter with bokeh model (#3527) ... Warn users if extension is not loaded before server page is...
Read more >
changelog.rst.txt - Dask.distributed
... `Matthew Rocklin`_ - Ignore ``bokeh`` warning in pytest (:pr:`6127`) ... (:pr:`5486`) `Gabe Joseph`_ - Deserialization: zero-copy merge subframes when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found