Improve the error message for the nbextension.

Closes #1624
pull/1645/head
Matthias Bussonnier 10 years ago
parent e34690dcf4
commit 25232daae3

@ -1122,7 +1122,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

Loading…
Cancel
Save