-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't save notebooks when toc2 extension is enabled #762
Comments
I should mention that this occurs whenever I have toc2 enabled, even if I have none of the other extensions here enabled. I do have the IPython widgets loaded, but nothing else. |
It seems that there is no toc section in your notebook's metadata, though it should have be created when loading the extension via main.js. Can you confirm that by looking at edit menu / Edit notebook metadata? |
Yeah, I don't see a toc section. Here's the whole thing: {
"kernelspec": {
"name": "python2",
"display_name": "Python 2",
"language": "python"
},
"widgets": {
"state": {
"98936d8870f84cffa288e5ced44a8b24": {
"views": [
{
"cell_index": 20
}
]
}
},
"version": "1.2.0"
},
"hide_input": false,
"language_info": {
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"name": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11",
"file_extension": ".py",
"codemirror_mode": {
"version": 2,
"name": "ipython"
}
},
"celltoolbar": "Initialisation Cell"
} |
Ok; It seems that config load fails somewhere.
|
I didn't see anything about config in the console, though you were correct about there not being in "toc2" section in the notebook.json. I modified a toc2 setting, though, and one appeared. After restarting the notebook server (just in case) it seems like it's now working, at least for notebooks that I never loaded with the toc2 extension before. The ones I tried to use with toc2, though, still have the same issue. I'm assuming it's something in the metadata, so I'll continue to look at that. |
I cannot reproduce (despite my efforts). Browser ? jupyter version?
I don't see what can happen. You can try to initialize the metadata yourself by adding |
I'm using Jupyter 4.2.0 and Chrome 53.0.2785.143 (64-bit). I think the On Wed, 12 Oct 2016 at 12:27 jfbercher [email protected] wrote:
|
@DavidJBianco I don't think your potential double-install would cause this problem (and may well cause none at all), but in any case you ought still to be able to fix it for future peace-of-mind by running
Running the system install command again shouldn't cause any problems, so it's worth rerunning after uninstalling the It might help reproducing the error if you could supply a sample notebook which causes the behaviour for you? |
As mentioned in jupyter/notebook#1882 (comment), this is probably caused by a race condition between the nbextension aditing metadata, and the notebook load editing it. If the nbextension makes its edits before the notebook finishes loading (liable to happen with large notebooks and/or high latency connections), then the notebook load event eventually overwrites the already-made nbextension edits. Hopefully we can get the relevant fix merged into this repo soon. |
[toc2] Highlight toc headings for sections with selected/edited/running cells; fix save issue #762
The issue is solved in #795. This can be closed now. |
I've noticed that when I have the toc2 extension enabled, I can load notebooks just fine, but pressing the "Save" button or using the save command under the File menu doesn't work. Looking at the jupyter server output without toc2 enabled, I get a log message that confirms that a save operation took place. However, with the toc2, no such message. And the notebook knows it hasn't been saved, since I get the message about unsaved changes when I try to navigate away.
Has anyone else seen this?
The text was updated successfully, but these errors were encountered: