From 7643236be3869c133df0a75ae85198c1dda5ff2c 2014-08-13 18:46:59 From: MinRK Date: 2014-08-13 18:46:59 Subject: [PATCH] add missing NBFormatError import in nbformat.reader.reads opening unreadable notebook format failed with 'NameError: NBFormatError' instead of the expected error. --- diff --git a/IPython/nbformat/reader.py b/IPython/nbformat/reader.py index 78e8a1d..bb94ee4 100644 --- a/IPython/nbformat/reader.py +++ b/IPython/nbformat/reader.py @@ -80,6 +80,8 @@ def reads(s, **kwargs): nb : NotebookNode The notebook that was read. """ + from .current import NBFormatError + nb_dict = parse_json(s, **kwargs) (major, minor) = get_version(nb_dict) if major in versions: