Native Notebooks - Error loading preloads: Cannot read property 'src' of null
See original GitHub issueEnvironment data
- VS Code version: 1.51.0-insider
- Extension version (available under the Extensions sidebar): v2020.11.311084263-dev
- OS and version: Darwin x64 19.6.0
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.6, conda
- Type of virtual environment used : Conda
- Relevant/affected Python packages and their versions: Altair=4.1.0
- Relevant/affected Python-related VS Code extensions and their versions: XXX
- Value of the
python.languageServer
setting: pylance
With the new Native Notebook and default “Jupyter Notebook Renderer”, I’m getting some error’s when trying to view plots as pngs, with both R/ggplot and Python/altair.
-
Altair: if I change the render from ‘mimetype’ (png) to html the chart outputs fine.
-
R/ggplot: the chart will display if I change to the builtin png renderer.
Expected behaviour
Chart output png images are displayed.
Actual behaviour
Error loading preloads: Cannot read property ‘src’ of null
Steps to reproduce:
import altair as alt
import pandas as pd
# doesn't work with png
alt.renderers.enable('mimetype')
# does work with html
# alt.renderers.enable('html')
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]})
alt.Chart(source).mark_bar().encode(
x='a',
y='b')
Logs
attached native notebook png output issue.txt
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Error loading preloads: Cannot read property 'src' of null · ...
With the new Native Notebook and default "Jupyter Notebook Renderer", I'm getting some error's when trying to view plots as pngs, with both...
Read more >python - Error loading preloads: Could not find renderer
In my case, I had Jupyter notebook extension installed. So, I did ctrl+shift+P and did Reload window ; resolved!
Read more >Bug listing with status RESOLVED with resolution FIXED as at ...
Cant load libsandbox.so ... no such file" status:RESOLVED resolution:FIXED ... Bug:2298 - "vanilla-sources ebuild replaces /usr/src/linux symlink without ...
Read more >npm install cannot read property 'insert' of undefined
This error can occur when trying to install a package with npm. The most common cause of this error is that the package...
Read more >Unable to set property 'src' of undefined or null reference
Your script is trying to find an element with a "name" attribute of "slideshow". Since one does not exist, you receive the error....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DonJayamanne In the screenshots I added, you can see the text “Select output mimetype to render for current output”.
For R cells only, I wanted to see if I could switch the default from “Jupyter Notebook Renderer” (doesn’t work) to “built-in” (does work), as a temp work around only while this issue is being worked on. Its not a huge deal, was just curious.
In general the new Native Notebooks are amazing though, thanks for all the work you guys put in!!
Been a few months since this was fixed hence closing this.