altair: NameError: name '_node' is not defined in altair/api.py:182
I am trying to save a png from altair with chart.savechart(filetype="eps", outfile="myfigure")
. I have installed canvas with npm install canvas
(I do not have conda). This command results in:
NameError Traceback (most recent call last)
<ipython-input-9-7cc84e0f0694> in <module>()
----> 1 chart.savechart(filetype="eps", outfile="occupancy_vs_epoch")
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/altair/api.py in savechart(self, outfile, filetype)
180 f.write(self.to_html())
181 else:
--> 182 supported = _node.SUPPORTED_FILETYPES + ['json', 'html']
183 raise ValueError('Cannot save chart of type {0}; supported'
184 'extensions are {1}'.format(filetype, supported))
NameError: name '_node' is not defined
It seems _node
is not mentioned anywhere else in this file. There is node
variable though.
Version: ‘1.2.0’
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (12 by maintainers)
I just added a PR that makes the urls more configurable in html output: #323