-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError: name '_node' is not defined in altair/api.py:182 #320
Comments
Update: if I replace
|
If I replace a bunch of other similar patterns to |
Thanks! fixed here: #321 It doesn't fix your issue, though, it just masks the error saying that "eps" is not a valid file extension. |
The #321 does not seem to fix the issue with
This might be related to the issue discussed here: More stable way is to use |
Yes, it looks like autoreload is causing issues with the object inheritance. I'd try without that. IMHO this is not an issue with altair's use of |
hmm. I really need it. It did not break any other reasonable python package I am using. So I guess, fixing to In any case, I am still getting following. How can I make sure altair finds
|
The node integration is currently quite experimental; you can read the documentation here: https://altair-viz.github.io/documentation/displaying.html#saving-figures-as-png-and-svg You'll need to |
Regarding |
this is very unfortunate that PNG is not supported. HTML that I save also produces no output: a blank page |
PNG is supported if you correctly set up the |
Regarding the blank page for HTML: I think you're running into a Vega-Lite version clash. The vega-lite team recently changed the URLs of the JS libraries on their website, and we have not had the chance to release a new Altair version with the updated URLs. We're getting to that – please be patient – in the meantime you can update the URL manually in the HTML file, and it should work. |
These are the lines that will need to be updated with the correct URLs: https://github.com/altair-viz/altair/blob/435770277bc20077464b24fd77cdc7a91a98ad25/altair/utils/html.py#L39 |
The updated URLs are
Hopefully the Vega/Vega-Lite projects will soon stabilize enough that these sorts of silent changes will not happen in the future. |
that helped! thank you! As to the node, running |
Yeah, the node stuff is still a bit of a mystery to me to be honest. The current solution is one that worked on my mac and on TravisCI when I first added it, but I don't think it's totally robust. |
I just added a PR that makes the urls more configurable in html output: #323 |
to get global bin, use |
Did you install the vega-lite npm package? |
Oh, that helps! I got impression from the documentation that I have to look for Now I am getting a bug (
After fixing it:
|
For some reason
|
the error due to filter happens independent of whether I use |
node is no longer supported in version 2. |
I am trying to save a png from altair with
chart.savechart(filetype="eps", outfile="myfigure")
. I have installed canvas withnpm install canvas
(I do not have conda). This command results in:It seems
_node
is not mentioned anywhere else in this file. There isnode
variable though.Version: '1.2.0'
The text was updated successfully, but these errors were encountered: