Skip to content

blank iplot in Jupyter Notebooks #1448

Closed
@michaelsweeney

Description

@michaelsweeney

I've been having a persistent but intermittent issue with iplot in Juypyter notebooks where the plots are blank, but space is taken up in the Jupyter notebook output for them. It seems to happen most often in notebooks with large amounts of data and frequent replotting within the notebook.

it seems like there at least a few other people with the same issue, across multiple versions of both Jupyter Notebooks and Plotly, but I haven't seen a definitive solution or explanation other than restarting computer/notebook, which does not always work in my case.

For what it's worth, in my current Jupyter notebook I'm plotting a simple scatter plot and getting a blank layout:

xs = [0, 1, 2, 3, 4]
ys = [4, 3, 2, 1, 0]
trace = go.Scatter(
    x = xs,
    y = ys,
    mode = 'markers'
)
data = [trace]
py.iplot(data)

And here is the JS console output:


main.min.js:33264 actions jupyter-notebook:find-and-replace does not exist, still binding it in case it will be defined later...
MenuBar.bind_events @ main.min.js:33264
main.min.js:12429 load_extensions Arguments(2)
main.min.js:12406 Loading extension: export_embedded/main
:8888/nbextensions/export_embedded/main.js?v=20190304112619:22 Notebook version 5.1.0 or higher required for this extension
main.min.js:24777 Session: kernel_created (f1932fce-d600-4f9e-a9d9-f8b88e8ba223)
main.min.js:23933 Starting WebSockets: ws://localhost:8888/api/kernels/6fbd3818-f86b-4d80-92dd-34b08ff15ea0
:8888/static/plotly.js?v=20190304112619:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:140 Uncaught Error: Script error for "plotly"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
main.min.js:12406 Loading extension: jupyter-js-widgets/extension
main.min.js:23577 Kernel: kernel_connected (6fbd3818-f86b-4d80-92dd-34b08ff15ea0)
main.min.js:23577 Kernel: kernel_ready (6fbd3818-f86b-4d80-92dd-34b08ff15ea0)
2Belmont%20HVAC%20Vis.ipynb:1 Uncaught TypeError: Cannot read property 'Plots' of undefined
    at eval (eval at globalEval (main.min.js:4), <anonymous>:1:61)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions