question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NameError: name '_node' is not defined in altair/api.py:182

See original GitHub issue

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’

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jakevdpcommented, Apr 24, 2017

I just added a PR that makes the urls more configurable in html output: #323

0reactions
jakevdpcommented, Mar 27, 2018

node is no longer supported in version 2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is name Node not defined? - python - Stack Overflow
You call Node within the definition of Node . You have to do it outside. Fixing your indentation in the end of the...
Read more >
Python nameerror name is not defined Solution - Career Karma
A NameError is raised when you try to use a variable or a function name that is not valid. In Python, code runs...
Read more >
nameerror name is not defined python 3 - GIS Stack Exchange
Check the alignment within the print_path(begin, end) function (possibly a copy/paste issue, but as it is it will not work).
Read more >
Learn how to turn off Safemode for NameNode service on ...
Name node is in safe mode. It was turned on manually. Use "hdfs dfsadmin -safemode leave" to turn safe mode off.
Read more >
rosserial "NameError: name 'client' is not defined"
rosserial "NameError: name 'client' is not defined" ... [INFO] [1603106570.886915]: ROS Serial Python Node [INFO] [1603106570.897550]: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found