Skip to content

JSON serialization error when updating hosted table with NaN values #1989

Answered by texodus
0x26res asked this question in Q&A
Discussion options

You must be logged in to vote
const websocket = perspective.websocket(
    "ws://localhost:8081/websocket"
);
const table = websocket.open_table("table_name");
viewer.load(table);

This code is telling the viewer frontend component to use the Table from Python, e.g. to not even instantiate the engine on the client side. Since there is no engine, there is no capability to read Arrow data. The UI uses JSON/Javascript data serialization e.g. when you scroll up and down in the viewport and data needs to be fetched to render to the screen, and when the engine is in Python, it must be further serialized as stringified-json across WebSocket, and Python cannot serialize NaN without a special (IIRC global?) handler.

You can avo…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by texodus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1985 on October 07, 2022 01:30.