From de75ee0a9348f6512fe075217ad4f985eee07732 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 1 Aug 2016 12:09:36 +0200 Subject: [PATCH] Backport PR #1645: Improve the error message for the nbextension. Closes #1624 --- @hainm would this be better? ... --- notebook/nbextensions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/nbextensions.py b/notebook/nbextensions.py index b1327a102..8d987d354 100644 --- a/notebook/nbextensions.py +++ b/notebook/nbextensions.py @@ -1131,7 +1131,8 @@ def _get_nbextension_metadata(module): """ m = import_item(module) if not hasattr(m, '_jupyter_nbextension_paths'): - raise KeyError('The Python module {} is not a valid nbextension'.format(module)) + raise KeyError('The Python module {} is not a valid nbextension, ' + 'it is missing the `_jupyter_nbextension_paths()` method.'.format(module)) nbexts = m._jupyter_nbextension_paths() return m, nbexts