nbviewer
nbviewer copied to clipboard
View as Code gives odd URL
Consider this:
https://nbviewer.jupyter.org/github/comet-ml/comet-examples/blob/master/notebooks/Comet-R-nnet.ipynb
If you click on the "View as Code" button:

Then it gives this URL:
https://nbviewer.jupyter.org/github/comet-ml/comet-examples/blob/master/notebooks/script/github/comet-ml/comet-examples/blob/master/notebooks/Comet-R-nnet.ipynb
which is a 404 error.
All of the notebooks in this directory give the same error regardless of the kernel of the notebook (R, Python). I'm not actually sure what is supposed to happen, but that URL looks malformed.
@dsblank Thanks for the report. It looks like a recent refactor introduced a path bug for the raw notebook rendering somewhere.
I get the same error on a Jupyterhub with nbviewer running as a service urls of /services/nbviewer/localfile/jupyter-test/test.ipynb change to /services/nbviewer/localfile/jupyter-test/script/localfile/jupyter-test/test.ipynb and throws a 404
I am getting the same error.
It would be great to finally solve it! :) IIUC, the problem sits somewhere here?: https://github.com/jupyter/nbviewer/blob/d9c5da7b1e12e184ce4bd8f9fc152d96aae7baa6/nbviewer/templates/notebook.html#L12