Endless error message with FileInput and big file

Hi,
when using FileInput with a server callback, error messages will always display the base64 string . If this string is big (100mb in my case) debugging gets impossible, because it prints out the complete string before any error.
Is there a way to prevent this?
Here is my minimal code:

from bokeh.plotting import curdoc
from bokeh.models import FileInput


def update_data(attr, old, new):
    print(1 + "1")


file_input = FileInput()
file_input.on_change("value", update_data)

curdoc().add_root(file_input)

And my command:

Bokeh serve --show test.py --websocket-max-message-size=500000000

By the way: is there any disadvantage of making the websocket size much bigger than necessary? Is just a thing less to think about, if I make it bigger than any file I’ll ever use.

Is there a way to prevent this?

Not presently. There is an old open issue:

But there has been some disagreement about details and as a result, so no work has been done to date.

By the way: is there any disadvantage of making the websocket size much bigger than necessary? Is just a thing less to think about, if I make it bigger than any file I’ll ever use.

Not sure. AFAIK we just mirror Tornado’s default value, which presumably they arrived at for some reason, but I don’t know the rationale.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.