No script folder generated by nbautoexport
Ziemersky opened this issue · 6 comments
- nbautoexport version: 0.3.1
- Python version: 3.8.8
- Operating System: Windows 10
Description
Package generates .nbautoinstall file in the intended folder, but no 'script' folder, nor scripts are generated.
What I Did
I installed the package following the installation guide using the Anaconda 3 Prompt and the conda install nbautoexport
command. Then I ran nbautoexport install
and specified the folder directory via nbautoexport configure "path"
.
The .nbautoexport file got generated and looks like this:
{
"export_formats": [
"script"
],
"organize_by": "extension",
"clean": {
"exclude": []
}
}
After running Jupyter Notebook (Versions: jupyter core: 4.7.1, jupyter-notebook : 6.3.0) and saving some of my .ipynb files, no 'script' folder was generated.
Since I am by no means an expert, let me know if I made an obvious mistake.
Hi @Ziemersky, thank you for trying out nbautoexport!
After running conda install nbautoexport
, did you run nbautoexport install
? This is a one-time setup step to register nbautoexport with Jupyter to run automatically. Note that if your Jupyter Notebook server is already running, you will need to restart it for it to take effect.
Hi Jay, thanks for the quick response!
Yes I did execute that command, just forgot to mention it. It also gave me the post-save hook installation success message.
I tried reinstalling nbautexport, restarting Jupyter Notebook and my computer several times but nothing helped.
@Ziemersky can you share the output of the following commands:
which jupyter
which nbautoexport
And then also run the jupyter notebook server, open a notebook, explicitly save the notebook, and share the logs that the notebook server prints out when doing that? It should mention the script exports if it is working.
@pjbull since the commands you mentioned throw an error of the following kind:
'which' is not recognized as an internal or external command,
operable program or batch file.,
I assume you mean the "program" --version
command. They give me:
For jupyter --version
:
jupyter core : 4.7.1
jupyter-notebook : 6.3.0
qtconsole : 5.0.3
ipython : 7.22.0
ipykernel : 5.3.4
jupyter client : 6.1.12
jupyter lab : 3.0.14
nbconvert : 6.0.7
ipywidgets : 7.6.3
nbformat : 5.1.3
traitlets : 5.0.5
and for nbautoexport --version
:
0.3.1
.
After starting the server and opening a file called "Glowplug_Temperature_normalized.ipynb", I pressed the "save" button. The output is:
[I 08:08:06.350 NotebookApp] Saving file at /PowerFolders/Droplet_Chamber/03Documentation/Tests/Analysis/Scripts/Glowplug_Temperature_normalized.ipynb
It does not mention the script exports.
Okay I figured it out.
I previously edited my jupyter_notebook_config.py
file in order to open the notebook in Chrome automatically.
To do so, I pasted some code from another forum into it, looking like this:
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
and uncommented line 536 c.NotebookApp.use_redirect_file = False
. Now the server did raise an "unexpected indent"-error on startup but somehow opened the notebook in chrome, so I forgot about it and moved on.
Turned out the path in the code snippet above is wrong. "chrome.exe" lies in C:\Program Files\Google\...
So I changed it, re-commented line 536 again and now it works!
Thanks for your help, without looking at the server outup I would have not looked into this.
Great! Glad we were able to help you resolve it. It's helpful to know about runtime errors in jupyter_notebook_config.py
as being one potential way things break. I'm going to close this issue since it looks like you're all set.