Seaborn: NameError: name 'channel' is not defined

Created on 19 Oct 2017  路  5Comments  路  Source: mwaskom/seaborn

I'm trying to use seaborn module to get innitated int he world of ML with the help of ML. I've been trying to use VS2017 and until here, everything is OK. The problem comes when I run the code and when the interpreter arrives at the import line of seaborn, it crashes. The error is the next one:

crashscreenshot

I looked for in the seaborn module folder with the help of bash on windows and the command: __grep -rnw ./ -e "channel"__ but just appear some channel in block comments. I don't understand at all what is happening.

Most helpful comment

https://github.com/Microsoft/PTVS/pull/3259/files

I think they have a bug here. I replaced the body of the name property of _DebuggerOutput and that fixed it for me.

    @property
    def name(self):
        return '<' + self.channel + '>'

All 5 comments

I don't understand at all what is happening.

I don't either. I also don't understand exactly what I'm looking at (i.e what this IDE is). Typically there would be a more detailed error message showing exactly where the error is coming from (in your case, it should be a line using the term "channel". I bet if you find that, it will answer your question. (Maybe "ver detailes"?).

This is VS2017, and it has installed Anaconda 5.0.0 and Python 3.6.3. And the detailed explanation It hink that doesn't explain anything, or at least I don't understand it:

NameError esception.
Message= name 'channel' is not defined
Stack -->
D:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\Python\Core\ptvsd\debugger.py:2585 in _DebuggerOutput.name
C:\Anaconda3\lib\site-packages\IPython\utils\io.py:41 in IOStream.__init__
C:\Anaconda3\lib\site-packages\IPython\utils\io.py:96 in \ C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:61 in \ C:\Anaconda3\lib\site-packages\IPython\terminal\embed.py:15 in \ C:\Anaconda3\lib\site-packages\IPython__init__.py:55 in \ C:\Anaconda3\lib\site-packages\ipywidgets__init__.py:23 in \ C:\Anaconda3\lib\site-packages\seaborn\widgets.py:8 in \ C:\Anaconda3\lib\site-packages\seaborn__init__.py:16 in \ D:\Projects\TitanicML\TitanicML\TitanicML.py:7 in \

That looks like the error is being raised from D:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\Python\Core\ptvsd\debugger.py:2585 in DebuggerOutput.name. It's happening when seaborn tries to import ipywidgets. Something seems to be broken either in Visual Studio, or your IPython installation, or how they talk to each other. I'm not sure which.

Closing as this looks like an issue in the guts of visualstudio.

https://github.com/Microsoft/PTVS/pull/3259/files

I think they have a bug here. I replaced the body of the name property of _DebuggerOutput and that fixed it for me.

    @property
    def name(self):
        return '<' + self.channel + '>'
Was this page helpful?
0 / 5 - 0 ratings