nbviewer
nbviewer copied to clipboard
Download notebook file size limit in nbviewer
Hi,
We are running nbviewer application on JupyterHub (Littlest JupyterHub) and have recently noticed that download notebook functionality in nbviewer is cutting off some cells in the downloaded notebook, so part of the notebook contents are not downloaded.
However, the viewing of notebook in nbviewer iteself works fine. Is there any max file size limit on notebook sizee in nbviewer download functionality?
Thank you!
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/nbviewer-truncating-notebooks-size-grater-than-128-kb/4605/1
I mentioned the issue on Jupyter Community Forum as well, to seek additional assistance.
Can you share a notebook that has this issue, both the downloaded truncated version and the original?
If the file itself is being truncated, then it will not be a valid notebook since the JSON won't be complete and you won't be able to open it. Is this the case? If the notebook is valid, then it is not being truncated at the http level. In that case, I suspect what's happening is a possible cache issue where the version rendered and the version downloaded are interacting with the cache differently.
@minrk : The notebook files are valid as we can run them successfully in JupyterHub and also browse the complete files in nbviewer. We can download these notebooks completely in Jupyter/JupyterHub and Chrome browser (starting http.server), but on clicking "Download" menu option in nbviewer is downloading partial files for notebooks greater than 128 KB (files less than 128 KB downloads completely)
Attached zip file has example notebooks - "chunks_3_jh" and "chunks_4_jh" notebooks are original files and "chunks_3_nbviewer" and "chunks_4_nbviewer" notebooks are truncated files (after nbviewer download) notebooks.zip
Screenshot of file sizes before nbviewer download and after nbviewer download:
@minrk : To add, it appears like notebook file itself is truncated on nbviewer download, hence we are receiving the below error when opening this notebook:
The error was: SyntaxError: Unexpected end of JSON input
Any thoughts? Thanks!