question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Altair not rendering in Jupyter notebook

See original GitHub issue

Hi there,

I’m running into an issue that popped out seemingly out of no where. As of this morning, when I try to run a simple Altair plot, it fails to render in the jupyter notebook. Like:

import pandas as pd
import altair as alt
df = pd.DataFrame(dict(a=[1], b=[2]))
alt.Chart(df).mark_point().encode(x='a', y='b')

which yields:

Error loading script: Script error for "vega-util", needed by: vega-embed http://requirejs.org/docs/errors.html#scripterror

In the command line of the notebook, I also see:

 404 GET /static/vega-util.js?v=20200908081432 (::1) 2.82ms referer=http://localhost:8888/notebooks/bug_demo.ipynb

I’m running on Windows 10, which may have updated itself last night. I’m at a loss. I’ve tried a few things: uninstalling/install jupyter, notebook, altair and vega, but none of that seems to work. Any help would be huge!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
domoritzcommented, Sep 8, 2020

Hmm, it looks like the browser is trying to load vega-util from /static but it’s not there. I can probably make a change to Embed to load vega instead.

1reaction
domoritzcommented, Sep 8, 2020

I’m fixing it. Please follow https://github.com/vega/vega-embed/issues/557.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to display altair charts in jupyter notebook
renderers.enable('notebook') . In Altair 4.0, the default renderer should work out-of-the-box in both Jupyter notebook and JupyterLab. Either ...
Read more >
Frequently Asked Questions — Altair 4.1.0 documentation
Altair can be used to create chart specifications with any frontend that executes Python code, but in order to render those charts requires...
Read more >
Hello World - Altair Python Install in Jupyter Notebook
In this blog, we'll look at how to download and install Altair, as well as some examples of using Altair capabilities for data...
Read more >
Is there a good way to generate plots from a console?
Hi Matthew,. The challenge is that Altair requires a Javascript engine in order to render plots, so it's a natural fit for platforms...
Read more >
altair - PyPI
The Altair API contains no actual visualization rendering code but instead ... Display visualizations in the live Jupyter Notebook, JupyterLab, nteract, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found