From 54015052378cbbdacccafb333b72e739c3cb4258 2013-12-04 00:37:07 From: damianavila Date: 2013-12-04 00:37:07 Subject: [PATCH] Fix nbrun in notebooks with non-code cells. --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index ed915c3..91fe12c 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2568,7 +2568,8 @@ class InteractiveShell(SingletonConfigurable): if not nb.worksheets: return for cell in nb.worksheets[0].cells: - yield cell.input + if cell.cell_type == 'code': + yield cell.input else: with open(fname) as f: yield f.read()