☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Custom model example raises: Model 'Custom' does not exist

Community Support
Madalin_F
Madalin_F

Hi,

I am trying to make my own custom tool and I keep getting

Error: Model ‘Custom’ does not exist. This could be due to a widget
or a custom model not being registered before first usage.

``

So I just assumed that I’m doing something wrong and tried the example from the custom extensions guide and I got the same error message.

Moreover, I tried this with both Bokeh 0.13.0 and 1.0.1 and the issue is still there.

The full code is:

from bokeh.core.properties import String, Instance

from bokeh.models import LayoutDOM, Slider

from bokeh.io import show, output_file

from bokeh.layouts import column

class Custom(LayoutDOM):

text = String(default="Custom text")

slider = Instance(Slider)

slider = Slider(start=0, end=10, step=0.1, value=0, title=“value”)

custom = Custom(text=“Special Slider Display”, slider=slider)

layout = column(slider, custom)

show(layout)

and I run it with:

python custom.py

``

Am I doing something wrong? Can you point me at least to where should I look?

Thank you,

Madalin

⌁   Link to post
Bryan
Bryan

Hi,

Almost all of the work in Bokeh is not done in Python, it is almost all done in the Javascript library BokehJS. Defining a Custom Model has two required parts, the Python description, and the JavaScript implementation. You have not supplied an implementation for your custom model. There is an entire chapter in the User's Guide on creating custom extensions complete with several fully worked examples that you can refer to:

  Extending Bokeh — Bokeh 1.0.2 documentation

Thanks,

Bryan

···

On Dec 4, 2018, at 02:39, Madalin Fasie <madalin.bogdan21@gmail.com> wrote:

Hi,

I am trying to make my own custom tool and I keep getting

Error: Model 'Custom' does not exist. This could be due to a widget
                     or a custom model not being registered before first usage.

So I just assumed that I'm doing something wrong and tried the example from the custom extensions guide and I got the same error message.

Moreover, I tried this with both Bokeh 0.13.0 and 1.0.1 and the issue is still there.

The full code is:

from bokeh.core.properties import String, Instance
from bokeh.models import LayoutDOM, Slider

from bokeh.io import show, output_file
from bokeh.layouts import column

class Custom(LayoutDOM):
    text = String(default="Custom text")
    slider = Instance(Slider)

slider = Slider(start=0, end=10, step=0.1, value=0, title="value")

custom = Custom(text="Special Slider Display", slider=slider)

layout = column(slider, custom)

show(layout)

and I run it with:

python custom.py

Am I doing something wrong? Can you point me at least to where should I look?

Thank you,
Madalin

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8640f78a-9e11-4396-90cd-0f1142e96873%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Madalin_F
Madalin_F

Hi,

Thank you for answering, now it’s more clear. I’m sorry for asking an obvious question.

Thanks a lot,

Madalin

În mar., 4 dec. 2018 la 18:34, Bryan Van de ven bryanv@anaconda.com a scris:

···

Hi,

Almost all of the work in Bokeh is not done in Python, it is almost all done in the Javascript library BokehJS. Defining a Custom Model has two required parts, the Python description, and the JavaScript implementation. You have not supplied an implementation for your custom model. There is an entire chapter in the User’s Guide on creating custom extensions complete with several fully worked examples that you can refer to:

    [https://bokeh.pydata.org/en/1.0.2/docs/user_guide/extensions.html](https://bokeh.pydata.org/en/1.0.2/docs/user_guide/extensions.html)

Thanks,

Bryan

On Dec 4, 2018, at 02:39, Madalin Fasie madalin.bogdan21@gmail.com wrote:

Hi,

I am trying to make my own custom tool and I keep getting

Error: Model ‘Custom’ does not exist. This could be due to a widget

                 or a custom model not being registered before first usage.

So I just assumed that I’m doing something wrong and tried the example from the custom extensions guide and I got the same error message.

Moreover, I tried this with both Bokeh 0.13.0 and 1.0.1 and the issue is still there.

The full code is:

from bokeh.core.properties import String, Instance

from bokeh.models import LayoutDOM, Slider

from bokeh.io import show, output_file

from bokeh.layouts import column

class Custom(LayoutDOM):

text = String(default="Custom text")
slider = Instance(Slider)

slider = Slider(start=0, end=10, step=0.1, value=0, title=“value”)

custom = Custom(text=“Special Slider Display”, slider=slider)

layout = column(slider, custom)

show(layout)

and I run it with:

python custom.py

Am I doing something wrong? Can you point me at least to where should I look?

Thank you,

Madalin

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8640f78a-9e11-4396-90cd-0f1142e96873%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/V2O5tvmnVkg/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/87B5AFB8-1206-47B8-83C2-1508EAC80772%40anaconda.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled