Unable to load autoload.js

I am getting following error when trying to run Panel+Django single app example.

Not Found: /sliders/autoload.js
[20/Jun/2023 04:50:55] “GET /sliders/autoload.js?bokeh-autoload-element=p1003&bokeh-app-path=/sliders&bokeh-absolute-url=http://127.0.0.1:8000/sliders HTTP/1.1” 404 2685

My installed python packages are :
asgiref==3.7.2
bleach==6.0.0
bokeh==3.1.1
certifi==2023.5.7
channels==4.0.0
charset-normalizer==3.1.0
contourpy==1.1.0
Django==4.2.2
idna==3.4
Jinja2==3.1.2
linkify-it-py==2.0.2
Markdown==3.4.3
markdown-it-py==2.2.0
MarkupSafe==2.1.3
mdit-py-plugins==0.4.0
mdurl==0.1.2
numpy==1.25.0
packaging==23.1
pandas==2.0.2
panel==1.1.0
param==1.13.0
Pillow==9.5.0
python-dateutil==2.8.2
pytz==2023.3
pyviz-comms==2.3.2
PyYAML==6.0
requests==2.31.0
six==1.16.0
sqlparse==0.4.4
tornado==6.3.2
tqdm==4.65.0
typing_extensions==4.6.3
tzdata==2023.3
uc-micro-py==1.0.2
urllib3==2.0.3
webencodings==0.5.1
xyzservices==2023.5.0

Am i missing something ?

Panel+Django only supports Django 2. Some work is ongoing in releasing bokeh-django, which supports 4. More info here.

Thanks @Hoxbro. I was able to get it working but it needs additional 2 hacks.

  • channels 3.0.5 (It doesn’t work with latest 4.0.0 version)
  • set environment variable BOKEN_RESOURCES=cdn
3 Likes

hey @damanahluwalia I had the exact same problem, but despite using channels 3.0.5 and setting the environmental variable BOKEH_RESOURCES=cdn, I still get the same issue. Any thoughts between yourself and @Hoxbro ?

EDIT:
I wanted to follow up that I also resolved this. In the urls.py file, for the autoload() snippet I put the Django app name instead of the view method name linked to the Panel app itself, i.e. "sliders" (this is because I still don’t fully grasp how all these components work together, but am learning). Writing this in case anyone else comes across this post.

2 Likes