It is working correctly in jupyter notebook, and also when templates are not used.
But, when I tried to create a structured web app adding template elements such as main, sidebar etc., then no widgets were displayed at all, as shown in the picture below.
This isn’t as simple a problem as you might think. If it were that easy to solve, I wouldn’t have asked in the first place. Initially, I tried using pn.extension() alone but that didn’t work. So, I attempted again specifying template=fast'. Changing the template to materialorbootstrap` did not solve the problem.
Without using any templates, the widgets appear fine on the browser.
The same problem persisted whether panel was installed through pip or conda.
Hmm, if I had to guess it’s likely environment specific.
if I just copy/paste the original SW-example into my jupyer-lab and replace .servable() with .show(). The resulting server runs fine in the Browser (tested MSEdge and Firefox) and displays the template and widget correctly. .
Same if I copy the original SW into a file and launch it with panel serve --show
my environment is very similar (same python, panel and jupyter-lab. I had still bokeh 3.2.0, but also works fine after upgrading to 3.2.2
I’m not seasoned enough to help from here though.
Wondering if you see anything weird if you start the panel serve with --admin and take a look at the admin Panel etc … (and maybe enable logs)
For me it’s the star, so when I have it in the code, even if it is commented out, it breaks the servable feature from within jupyter lab, I get error 500, remove it stuff starts to work, though I can show() no issues, didn’t go as far as trying to serve from command line.
Thanks for everyone’s enthusiastic participation in the discussion…
First of all, it is not the problem of “” nor the problem of ad-blocker or any other extension.
The culprit was the Chrome Browser itself.
Inspect panel shows the following error:
Error rendering Bokeh items: Error: panel.models.browser.BrowserInfo(p1402).timezone given invalid value: undefined
at N.validate (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:182:2258)
at N._update (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:182:1973)
at N.set_value (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:182:1466)
at d._setv (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:179:5411)
at d.setv (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:179:5994)
at d.set [as timezone] (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:179:1168)
at s.initialize (panel.min.js?v=206620a657f1ccc8af72b866fdcef20e641c48f39ce27f338ce8313949c63e53:49:434)
at a (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:224:197)
at t.build_view (bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:224:321)
at bokeh.min.js?v=3ca6425586de5036dc01992dd69aa61e9196dd02619557cfaeb1b3d8b77adf724be49401b1168483d165494ce57a6daa16e6f6d3660fef117d45028221f86357:218:257
I cannot know why timezone error is involved in this situation, but the situation is as it seems.
The same code works without glitch in Safari browser.