Plotly offline embed-resources not working #10706
Replies: 3 comments 1 reply
-
First, the issue is not really Quarto. Now, your idea to use In project:
type: default
resources:
- "js/jquery.min.js"
- "js/require.min.js" Side note, you don't need to multiply the text key: include-in-header:
- text: |
<script src="./js/jquery.min.js"></script>
<script src="./js/require.min.js"></script> |
Beta Was this translation helpful? Give feedback.
-
Hi @bryanwhiting , |
Beta Was this translation helpful? Give feedback.
-
@bryanwhiting I don't see how the message "Make sure Spark has enough available resources for Jupyter to create a Spark context." does not come for PySpark session or related. In which environment are you running ? Any search on this sentence in google points to Spark related content. I don't think this Quarto related, but Quarto will try to find a Python kernel it can use, and will use the first one. I would check all your Jupyter kernels (using |
Beta Was this translation helpful? Give feedback.
-
Context
I work in an off-line environment (no access to the internet). I can run this code in a jupyter notebook and have it render plotly properly. But when I either try to convert the notebook into html using
quarto render my.ipynb --to html
or put all this code below in afile.qmd
and render, I cannot see the plotly code..ipynb
file yields CDN issues, which i try to overcome withinclude-in-header
but i'm not certain the right way to go about this from the docs..qmd
oddly complains aboutpyspark
, and doesn't try using the CDN (also odd)Goal
Get a self-contained html file with plotly rendered in an offline environment that cannot access the CDN that I can download and share with colleagues.
Repro
Here's what I have:
quarto version 1.5.57
Error using .qmd file
When I do
quarto render file.qmd --to html
, this is what I see. This is odd, because I don't use pyspark:Error using .ipynb
When i put the above code in a jupyter notebook, render it, and save it, and then call
quarto render file.ipynb --to html
, I get these timeout warnings asking for jquery.min.js and require.min.jsText of error (to make this issue searchable):
Things I've tried
include-in-header:
with various attempts atplotly_connected: false
or evenplotly.offline.init_notebook_mode(connected=True)
per some plotly figures are not rendered (unpredictably) #1689/ajax/libs/*
and have removed the js.scripts:
with pointing to the .js file and that didn't seem to embed itConfusion
<script src=js/require.min.js>
in the output HTML file when I inspect it, but shouldn't it be embedding that files' contents?Some python packages in details
Beta Was this translation helpful? Give feedback.
All reactions