Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plots not rendering in JupyterLab (Javascript Error: Cannot set property '1257' of undefined) #3351

Closed
stevenlis opened this issue Dec 27, 2018 · 13 comments

Comments

@stevenlis
Copy link

stevenlis commented Dec 27, 2018

Just finished setting up everything by following the doc

snipaste_684

Tried a very simple example in Chrome, but nothing seems to render in Jupyterlab

image

Am I missing something?

@stevenlis stevenlis changed the title Plots not rendering in Jupyterlab Plots not rendering in Jupyterlab (Javascript Error: Cannot set property '1257' of undefined) Dec 27, 2018
@stevenlis stevenlis changed the title Plots not rendering in Jupyterlab (Javascript Error: Cannot set property '1257' of undefined) Plots not rendering in JupyterLab (Javascript Error: Cannot set property '1257' of undefined) Dec 27, 2018
@philippjfr
Copy link
Member

HoloViews 1.10.4 is pretty old at this point, could you try updating to 1.11.0 using:

conda install -c pyviz holoviews

# or
pip install holoviews

@stevenlis
Copy link
Author

Unfortunately, the problem exists.
image

Btw, pip can only find 1.10.7 now.

image

@philippjfr
Copy link
Member

Even when you clear the notebook and then reload the page?

@stevenlis
Copy link
Author

I reinstalled the extensions by running the following:

jupyter labextension install @pyviz/jupyterlab_pyviz

It is working now. Thanks!

Btw, nteract also have some weird behaviors. Should I open a new issue?

@philippjfr
Copy link
Member

I think a discussion about nteract is worth having. We should at least see how hard it would be to get that working so an issue would be appreciated.

@philippjfr
Copy link
Member

Thanks for opening #3353, I'll close this issue now.

@keflavich
Copy link

I'm experiencing the same issue ("Javascript Error: Cannot set property '1005' of undefined", where the number changes each time.) I'm on holoviews 1.11.3, bokeh 1.0.4, jupyterlab_bokeh 0.6.3, jupyterlab_pyviz 0.7.0 (see https://gist.github.com/keflavich/a9f23e2f21e3ca9e74e78f9a6e8dafae for the complete MWE + version list). Is there still something wrong with my installation?

@philippjfr
Copy link
Member

I was literally just encountering the same issue, I'll investigate and get back to you.

@philippjfr
Copy link
Member

@keflavich Could you do me a favor, could you go into your browser developer console while in the JupyterLab and print the output of window.PyViz? I think there is a horrible bug in pyviz_comms that results in the variable being accidentally set to any DOM nodes of headers containing the words PyViz or HoloViews.

@keflavich
Copy link

I'm not too familiar with the dev console; is this deep enough?

{kernels: {…}, init_slider: ƒ, init_dropdown: ƒ, comm_manager: JupyterCommManager}
comm_manager
:
JupyterCommManager
__proto__
:
Object
init_dropdown
:
ƒ init_dropdown(id, plot_id, dim, vals, value, next_vals, labels, next_dim, dim_idx, dynamic)
arguments
:
(...)
caller
:
(...)
length
:
10
name
:
"init_dropdown"
prototype
:
{constructor: ƒ}
__proto__
:
ƒ ()
[[FunctionLocation]]
:
widgets.js:133
[[Scopes]]
:
Scopes[2]
init_slider
:
ƒ init_slider(id, plot_id, dim, values, next_vals, labels, dynamic, step, value, next_dim, dim_idx, delay)
arguments
:
(...)
caller
:
(...)
length
:
12
name
:
"init_slider"
prototype
:
{constructor: ƒ}
__proto__
:
ƒ ()
[[FunctionLocation]]
:
widgets.js:36
[[Scopes]]
:
Scopes[2]
kernels
:
__proto__
:
Object
__proto__
:
constructor
:
ƒ Object()
hasOwnProperty
:
ƒ hasOwnProperty()
isPrototypeOf
:
ƒ isPrototypeOf()
propertyIsEnumerable
:
ƒ propertyIsEnumerable()
toLocaleString
:
ƒ toLocaleString()
toString
:
ƒ toString()
valueOf
:
ƒ valueOf()
__defineGetter__
:
ƒ __defineGetter__()
__defineSetter__
:
ƒ __defineSetter__()
__lookupGetter__
:
ƒ __lookupGetter__()
__lookupSetter__
:
ƒ __lookupSetter__()
get __proto__
:
ƒ __proto__()
set __proto__
:
ƒ __proto__()

... that formatted badly so here's a screenshot too:
image

@philippjfr
Copy link
Member

That's perfect thanks, looks like we're not seeing the same issue then. While you're in the developer console can you rerun a plot and take a screenshot of the full error stack that shows up in the console?

@keflavich
Copy link

I reloaded my browser window to get a clean error log (previously I had ~450 errors?), and suddenly the plot appeared. I guess that suggests that this is some browser-related problem that maybe can be solved by refreshing? I'm trying a more complicated example too, but for now, it looks like this problem resolved itself.

@philippjfr
Copy link
Member

Glad to hear it! I recall having the same issue once or twice and it resolving itself. The next time it happens I'll investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants