☰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

BokehJS example

Community Support
yonatan.negash
yonatan.negash

Hi all,
I am trying to run the first example for a standalone bokehjs application found here:

Developing with JavaScript — Bokeh 2.4.2 Documentation

I have saved this example code in a file called test.js

My HTML file looks like this:

*** ***

*** ***

*** Bokeh Plot***

*** ***

*** ***


*** ***

*** ***


*** ***


*** ***

*** ***

*** ***

I get the following error when I load the page:

Uncaught TypeError: Cannot read property ‘linspace’ of undefined

What am I doing wrong?

Thanks,

-Yonatan

⌁   Link to post
Bryan
Bryan

Hi,

You are looking at "latest" docs, which are for 0.12.4, but in your HTML you are loading BokehJS 0.12.3 instead. My guess is that is your problem. The BokehJS API is still very new and evolving. It is important to always make sure the code you are looking at is matched by the corresponding version of BokehJS.

Thanks,

Bryan

···

On Jan 16, 2017, at 12:13 PM, yonatan.negash@gmail.com wrote:

Hi all,
I am trying to run the first example for a standalone bokehjs application found here:

    http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html

I have saved this example code in a file called test.js

My HTML file looks like this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Bokeh Plot</title>

        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.css&quot; type="text/css" />
        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.css&quot; type="text/css" />
                
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.js&quot;&gt;&lt;/script&gt;
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.js&quot;&gt;&lt;/script&gt;
         
    </head>
    
    <body>
        <script type="text/javascript" src="test.js"></script>
    </body>
</html>

I get the following error when I load the page:

    Uncaught TypeError: Cannot read property 'linspace' of undefined

What am I doing wrong?

Thanks,

-Yonatan

--
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/6a756c5b-63df-49b9-a800-13e8ebea5ea4%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Mateusz_Paprocki
Mateusz_Paprocki

Hi,

···

On Mon, Jan 16, 2017 at 7:13 PM, yonatan.negash@gmail.com wrote:

Hi all,
I am trying to run the first example for a standalone bokehjs application found here:

http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html

I have saved this example code in a file called test.js

My HTML file looks like this:

*** ***

*** ***

*** Bokeh Plot***

*** ***

*** ***


*** ***

*** ***


*** ***


*** ***

*** ***

*** ***

I get the following error when I load the page:

Uncaught TypeError: Cannot read property ‘linspace’ of undefined

you need to add bokeh-api.min.js. You can also remove bokeh-widgets.min.{js,css}, as they aren’t needed for the referenced example.

Mateusz

What am I doing wrong?

Thanks,

-Yonatan

–

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/6a756c5b-63df-49b9-a800-13e8ebea5ea4%40continuum.io.

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

⌁   Link to post
yonatan.negash
yonatan.negash

Thank you all for your quick reply!

Mateusz,
Adding bokeh-api.min.js did the trick, although this is not mentioned in the user guide.

Thanks,

-Yonatan

···

On Monday, January 16, 2017 at 1:14:53 PM UTC-5, yonatan...@gmail.com wrote:

Hi all,
I am trying to run the first example for a standalone bokehjs application found here:

http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html

I have saved this example code in a file called test.js

My HTML file looks like this:

*** ***

*** ***

*** Bokeh Plot***

*** ***

*** ***


*** ***

*** ***


*** ***


*** ***

*** ***

*** ***

I get the following error when I load the page:

Uncaught TypeError: Cannot read property ‘linspace’ of undefined

What am I doing wrong?

Thanks,

-Yonatan

⌁   Link to post
Bryan
Bryan

Hi,

Please feel free to open an issue about the documentation, so that it is not forgotten, or better yet, a small PR to update this file:

  https://github.com/bokeh/bokeh/blob/master/sphinx/source/docs/user_guide/bokehjs.rst

Thanks,

Bryan

···

On Jan 16, 2017, at 1:41 PM, yonatan.negash@gmail.com wrote:

Thank you all for your quick reply!

Mateusz,
Adding bokeh-api.min.js did the trick, although this is not mentioned in the user guide.

Thanks,

-Yonatan

On Monday, January 16, 2017 at 1:14:53 PM UTC-5, yonatan...@gmail.com wrote:
Hi all,
I am trying to run the first example for a standalone bokehjs application found here:

    http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html

I have saved this example code in a file called test.js

My HTML file looks like this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Bokeh Plot</title>

        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.css&quot; type="text/css" />
        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.css&quot; type="text/css" />
                
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.js&quot;&gt;&lt;/script&gt;
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.js&quot;&gt;&lt;/script&gt;
         
    </head>
    
    <body>
        <script type="text/javascript" src="test.js"></script>
    </body>
</html>

I get the following error when I load the page:

    Uncaught TypeError: Cannot read property 'linspace' of undefined

What am I doing wrong?

Thanks,

-Yonatan

--
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/27f2ed95-40a1-4f1f-be80-c6a2581120bb%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled