Closed juanep97 closed 7 years ago
What version of hide_code are you using and did you install via nbextensions?
Hello,
This is the output of pip show hide_code
:
Name: hide-code
Version: 0.4.0
Summary: A Jupyter notebook extension to hide code, prompts and outputs.
Home-page: https://github.com/kirbs-/hide_code
Author: Chris Kirby
Author-email: kirbycm@gmail.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: jupyter, pdfkit, nbconvert
I installed it executing:
pip install hide_code
jupyter nbextension install --py hide_code
jupyter nbextension enable --py hide_code
jupyter serverextension enable --py hide_code
I also reinstalled it with the --sys-prefix
to see if that was the reason, to no avail.
Not sure what's wrong here. Hide_code is using Jupyter's paths to access the underlying .ipynb file. If you navigate to http://localhost:8888/notebooks/Untitled.ipynb does the notebook open up?
Yes, it does open. Have you confirmed the bug or is something affecting my installation solely?
It's a bug. Looks like the jupyter method I'm using to find the underlying file is a relative path. I'll have to do some digging in Jupyter's documentation to find an alternative.
Hello,
I have python 2.7.11-1 on Ubuntu 16.04 and ipython-2.4.1-1 and jupyter (pip-installed).
I changed
/home/user/.jupyter/jupyter_notebook_config.py
from:c.NotebookApp.notebook_dir = u''
toc.NotebookApp.notebook_dir = u'/home/user/Workspace/Python'
so that it starts in such folder automatically. However this seems to break hidecode. When exporting a notebook (for example, with html), it gives a 500 Internal Server Error in the browser and the following output:It seems that hidecode cannot find the notebook file, at the time of execution of
/usr/local/lib/python2.7/dist-packages/hide_code/hide_code.py
. The argument args of the get method of HideCodeHTMLExportHandler does not seem to contain the full path to the notebook file, so I think that is the problem (the change applied to jupyter configuration file is not reflected here).I don't know if this is intended behavior but I thought I would report it anyway, as it is a bit irksome. If there is anyway to fix it or a work around I would like to know.
Thank you. This extension is definitely useful.