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.

DeserializationError when editing Data Table

See original GitHub issue

Current environment:

  • Bokeh 0.12.14dev3 (although I think the same error occurs in 0.12.13)
  • Python 3.6
  • Windows 10
  • Google Chrome

When editing or clicking on cells in a data table bokeh will display a DeserializationError: image

This can be tested with the data_table.py example on the bokeh github. Open that server up and then click on a cell and the error should appear. Not sure where this is coming from, but I do believe it happened somewhere after 0.12.10 (which doesn’t produce the error).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
bryevdvcommented, Jan 30, 2018

FYI a potential workaround for now at least is to use python lists for a datatable source:

def update():
    current = df[(df['salary'] >= slider.value[0]) & (df['salary'] <= slider.value[1])].dropna()
    source.data = {
        'name'             : list(current.name),
        'salary'           : list(current.salary),
        'years_experience' : list(current.years_experience),
    }
1reaction
Karel-van-de-Plasschecommented, Jun 17, 2018

Just to let you know this is still there in `0.13.0dev11’. A minimal(er) example:

import numpy as np

from bokeh.models import ColumnDataSource
from bokeh.io import curdoc, output_notebook, push_notebook, show
from bokeh.models.widgets import DataTable, TableColumn, StringFormatter

data = dict(
X = np.linspace(0, 10), # Wrap with list() to remove the unhandled error
Y = np.linspace(10, 20) # Wrap with list() to remove the unhandled error
)
source = ColumnDataSource(data)

columns = [ 
TableColumn(field="X", title="X",formatter=StringFormatter(font_style="bold",text_color="midnightblue")),TableColumn(field="Y", title="Y",formatter=StringFormatter(font_style="bold",text_color="midnightblue")),
]

data_table = DataTable(source=source,
                       columns=columns,
                       fit_columns=True,
                       width=850, height=280,       
                       editable=True)

curdoc().add_root(data_table)
Read more comments on GitHub >

github_iconTop Results From Across the Web

DeserializationError when editing Data Table #7417 - GitHub
Current environment: Bokeh 0.12.14dev3 (although I think the same error occurs in 0.12.13); Python 3.6; Windows 10; Google Chrome.
Read more >
DeserializationError with Demo Code - Bokeh Discourse
Listing all columns of a dataframe doesn't seem to be pythonic. Is this the recommended method? source.data = current.to_dict('list'). I tried it and...
Read more >
DataTable deserialization - column type mismatch
Issue 1: This may cause a deserialization error if first row type is inferred as too specific for all values. Error will be...
Read more >
WCF List<string > serialization/deserialization error
When the value of Response.Data dictionary is of type int, string, double or any other 'simple' primitive types, WCF can successfully serialize the...
Read more >
How to handle deserialization errors using ksqlDB
Short Answer. Query the ksqlDB stream KSQL_PROCESSING_LOG : SELECT message->deserializationError->errorMessage ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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