Bokeh error with 2.3.1

Hi All,

I need to view the files on folder using File Selector. At the same time, I should also be able to refresh the files in the specified folder to view the latest files.
I am using files._refresh() for this. It works fine with jupyter notebook, but when I execute the same code as a python file, I see bokeh issue in the console. Below in the Jupyter notebook screenshot and attached is the python file.
Bokeh version : 2.3.1
Panel Version : 0.11.2
If I downgrade the bokeh version to 2.1.1, it works fine using the python file but bokeh 2.1.1 does not support the _refresh() functionality in panel.

The bokeh error in the console is-

“Failed to repull session Error: Model ‘panel.models.markup.HTML’ does not exist. This could be due to a widget or a custom model not being registered before first usage.”

file.py (637 Bytes)

Hi @VineetKhatwal

Sometimes and older version of bokeh.js is kept in the browser and the browser needs to be hard refreshed. Could you try to do that and report back?

If that does not work could you provide the above code as something that can be copied. That would make it possible to test on my end if the problem can be reproduced?

Update:

I found the code here and also @nghenzi2019 showing that it can work. The hard refresh would be the first thing to try.

Hi @Marc and @nghenzi2019

Thanks a lot for your guidance.

Hard reset was able to resolve the page load issue. Another issue was caused due to pylint-django which was used to suppress ‘Instance of ‘FileSelector’ has no ‘_refresh’ memberpylint(no-member)’ message.

Finally everything seems to work fine now!

Thanjks,
Vineet

1 Like

Awesome :+1:

1 Like