Panel server does not load

Hi,
My browser says these:

bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587 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.
at _.get (bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:166:1015)
at E._instantiate_object (bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:165:4956)
at E._instantiate_references_json (bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:165:5144)
at E.from_json (bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:165:8794)
at d._repull_session_doc (bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587:2847)
_repull_session_doc @ bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587
await in _repull_session_doc (async)
_awaiting_ack_handler @ bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587
_current_handler @ bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587
_on_message @ bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587
socket.onmessage @ bokeh.min.js?v=3c61e952b808bb7e346ce828a565a5f23aaf7708d034fa9d0906403813355d45bb4e8d8b0b23a93f032c76831d4f0221846f28699c7f5147caa62e0d31668314:587

Do you have an idea why these errors occur?

if you are using bokeh and panel with flask, fastapi or another framework, this error usually happens because you do not import panel in the python module where you pull the session. Panel has a custom bokeh HTML model, which it needs to be imported for bokeh understands it. Model ‘panel.models.markup.HTML’ does not exist. This could be due to a widget or a custom model not being registered before the first usage.

If you give more detail about the code you are using, and how you are running it, you can obtain more help. It is difficult to give an opinion without understanding what you are specifically doing

Thank you
I try to build the app as a Docker container.
here is the related part of Dockerfile

# Python packages from conda
RUN conda install -y \
    python \
    pillow \
    bokeh \
    param \
    holoviews \
    hvplot \
    panel \
    colorcet \
    datashader \
    geopandas

RUN pip install pyarrow
RUN pip install spatialpandas

it gives :
console.trace() Error: Model ‘panel.models.location.Location’ does not exist. This could be due to a widget or a custom model not being registered before first usage.

Hi, it should be easier to help with all the details. A minimum, reproducible example with all the code and config files needed

1 Like