atom-notebook icon indicating copy to clipboard operation
atom-notebook copied to clipboard

all Python cells throw AttributError: 'list' object has no attribute 'isspace'

Open kfix opened this issue 9 years ago • 14 comments

OSX 10.11.3 Atom 1.5.3 Python 3.5.1 apm: jupyter-notebook: 0.0.9 pip: notebook: 4.1.0

Every time I try to execute a cell, this is the result:

Traceback (most recent call last):

  File "/usr/local/lib/python3.5/site-packages/ipykernel/ipkernel.py", line 175, in do_execute
    shell.run_cell(code, store_history=store_history, silent=silent)

  File "/usr/local/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2629, in run_cell
    if (not raw_cell) or raw_cell.isspace():

AttributeError: 'list' object has no attribute 'isspace'

kfix avatar Feb 23 '16 00:02 kfix

@rgbkrk Any ideas?

gnestor avatar Feb 23 '16 01:02 gnestor

No clue there. Version drift between the kernel gateway and the ipython kernel?

Have you tried out any of the JS packages we've been making @gnestor?

rgbkrk avatar Feb 23 '16 02:02 rgbkrk

@rgbkrk Not yet but I think it's time to start!

gnestor avatar Feb 23 '16 17:02 gnestor

Upgraded jupyter_kernel_gateway from 0.3.1 to 0.4.0. No change. Maybe the plugin needs to do a little enforcement and print an idiot warning?

kfix avatar Feb 23 '16 17:02 kfix

Same here. Anybody has a resolution?

leonqli avatar Mar 16 '16 04:03 leonqli

Same here

wandonye avatar Mar 23 '16 18:03 wandonye

here too

console shows this:

Invalid Kernel message: 
iopub content field code is not of type string
Kernel._onWSMessage @ C:\Users\rornor\.atom\packages\jupyter-notebook\node_modules\jupyter-js-services\lib\kernel.js:770

Also, (assuming cause by this issue) when I close Atom, all subprocesses close but jupyter-kernelgateway process detaches and remains active.

rornor avatar Mar 26 '16 18:03 rornor

Same here. @gnestor @rgbkrk

dawnft avatar May 17 '16 07:05 dawnft

The same here. @gnestor @rgbkrk

uralik avatar May 29 '16 15:05 uralik

~~Once we have the prebuilt zmq story better underway, I'll be happy to come back to this repo to make it a fully standalone (no need for kernel gateway) Atom package, like Hydrogen.~~ Right now I don't have time to assist with this package, though I'll happily merge PRs that help push us towards the right efforts. Most of my open source node+jupyter time is in the nteract org.

rgbkrk avatar Jun 01 '16 21:06 rgbkrk

Any solutions?

shierve avatar Jul 09 '16 11:07 shierve

Another one here. Ubuntu: 16.04 Atom: 1.7.2 Python: 3.5.1 jupyter-notebook: 0.0.9

wiheto avatar Sep 08 '16 15:09 wiheto

Installed latest Atom version (1.10.2), now I have problems opening jypyter server: https://github.com/jupyter/atom-notebook/issues/55

wiheto avatar Sep 08 '16 16:09 wiheto

This happens on line 2910 of interactiveshell.py for me

/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py in run_cell_async(self, raw_cell, store_history, silent, shell_futures)
   2908         result = ExecutionResult(info)
   2909 
-> 2910         if (not raw_cell) or raw_cell.isspace():
   2911             self.last_execution_succeeded = True
   2912             self.last_execution_result = result

AttributeError: 'builtin_function_or_method' object has no attribute 'isspace'
Out[5]: 'None'

In [6]: str(interactive_variables['interactive_console'].run_cell(print, True).result)    

Seems like it could be solved with a simple try/except

see: https://github.com/ipython/ipython/issues/11914

gigaj0ule avatar Oct 15 '19 23:10 gigaj0ule