Closed jowens closed 6 months ago
Hey @jowens, you don't have to import vl_convert
for this to work. This error is in Altair before it gets to invoking vl-convert. Can you open an issue in the altair repo (https://github.com/altair-viz/altair) with a repro and the exact version of altair you're using?
I can't reproduce this with a simple test, and looking at the code in https://github.com/altair-viz/altair/blob/v5.2.0/altair/utils/mimebundle.py, it doesn't look like embed_options
should ever be None
when passed into preprocess_embed_options
.
One quick thing to look at is, what's the result of?
import altair as alt
alt.renderers.options.get("embed_options", {})
Could you include this result in the Altair issue?
Hate to make your life harder, really I do.
print(alt.renderers.options.get("embed_options", {}))
vf.enable()
print(alt.renderers.options.get("embed_options", {}))
prints
{}
None
Oh wait that's vegafusion. That's not you.
I've disabled vf and everything works as expected.
Oh, that's really helpful! I'll open a VegaFusion issue to avoid setting this to None.
Having trouble interpreting the error message when calling
chart.save
to a PDF.I have
import vl_convert as vlc
(although no other references to vlc in my code) and I've donepip install vl-convert-python
but there's nothing in that trace that indicates it's dropped out of Altair into vl_convert. The Altair instructions are dead simple (https://altair-viz.github.io/user_guide/saving_charts.html) so I've clearly missed something.Keeping you busy today!