简体   繁体   中英

Bokeh Uncaught Error: property wasn't declared

I have successfully deployed my Django app on PythonAnywhere.com except for my Bokeh plots. Instead of rendering, this is the error that shows up in the console.

bokeh-1.1.0.min.js:31 Uncaught Error: property Title.plot wasn't declared
at e.setv (bokeh-1.1.0.min.js:31)
at e [as constructor] (bokeh-1.1.0.min.js:31)
at e [as constructor] (bokeh-1.1.0.min.js:31)
at e [as constructor] (bokeh-1.1.0.min.js:31)
at e [as constructor] (bokeh-1.1.0.min.js:31)
at e [as constructor] (bokeh-1.1.0.min.js:31)
at new e (bokeh-1.1.0.min.js:31)
at Function.t._instantiate_object (bokeh-1.1.0.min.js:31)
at Function.t._instantiate_references_json (bokeh-1.1.0.min.js:31)
at Function.t.from_json (bokeh-1.1.0.min.js:31)

It works fine on LocalHost. Now that it is deployed, it throws up this error. I tried to read through the JS file itself, but am clueless.

I was facing a similar issue, but it turned out that the version of bokeh I was using was different from that required by the stylesheets and scripts I imported.

You can check the version of bokeh on the server using:

pythonX.Y
>>> import bokeh
>>> bokeh.__version__

where XY is the python version you selected for deployment. After that, just install the required bokeh module using:

pythonX.Y -m install bokeh==<required version> --upgrade --user

( Mentioning the python version is important. )

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM