- edited description
Error loading calico-spell-check extension
When I tried to load the calico-spell-check nbextension I saw the following error in the js console:
cannot read property ' model ' of undefined
The problems seems to be in the line:
document.original_heading_mode = IPython.HeadingCell.options_default.cm_config.mode
that fails due to IPython.HeadingCell.options_default has not cm_config attribute.
I changed this line by:
document.original_heading_mode = "gfm"
and it works well.
Install data:
platform : linux-64 Python 3.4.1 |Anaconda 2.1.0 (64-bit) IPython 2.2.0
Comments (9)
-
reporter -
Are you running from the downloads, or from master? I believe that this is fixed in master. Need to make updated downloads.
-
reporter I am running from the downloads.
I just tried the calico-spell-check.js from the repository but I received the same error (it also contains the line that fails in my ipython: document.original_heading_mode = IPython.HeadingCell.options_default.cm_config.mode)
-
This sounds like a timing issue where
IPython.HeadingCell.options_default
hasn't been initialized yet. You can, as you have suggested, just hard-code the original mode. But it sometimes changes. The correct solution will be to not set the original until after IPython has finished initialization. I'll see if we can add something else in the require.... -
reporter I tested with an open notebook and I received the same error. Is it possible that my IPython version has not this attribute?
%%javascript alert(IPython.HeadingCell.options_default.cm_config.mode)
Javascript error adding output! TypeError: Cannot read property 'mode' of undefined See your browser Javascript console for more details.
-
reporter I just confirmed my question, IPython 2.2 has not defined the cm_config for HeadingCell:
https://github.com/ipython/ipython/blob/2.x/IPython/html/static/notebook/js/textcell.js (line 346)
-
I see... we have let some IPython 3.0 stuff slip in. Ok, thanks! Will fix.
-
Should be fixed with ac1ea2d. Uploaded new version of calico-spell-check to downloads.
-
- changed status to resolved
Thanks!
- Log in to comment