Panel regression? (embedding panel in gunicorn+Flask)

Hi Philipp,

I encounter the same issue with Panel 0.11.3, I had to downgrade to 0.11.1 for my project to work. The problem appears starting 0.11.2.

The bug is still the same : the URL of the CSS are relative, not absolute. Thus, if I serve bokeh documents (with port 5006) via Flask (port 8080), Panel CSS are loading with port 8080 instead of 5006.

# from flask app, when reaching 127.0.0.1:8080
script = server_document('http://127.0.0.1:5006/bokeh_page')
return render_template("embed.html", script=script)

When I check the page http://127.0.0.1:5006:bokeh_page/autoload.js, I see the following :

the last CSS urls are relative, which results in a 404 when the page is embedded.

This suggested workaround above still works though :

from bokeh.settings import settings
settings.resources = 'inline'

I hope this helps. Thanks for your time and your help :slight_smile:

1 Like