Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amit1rrr/52ec393932b9ae59f68a6acc8f46cfa3 to your computer and use it in GitHub Desktop.
Save amit1rrr/52ec393932b9ae59f68a6acc8f46cfa3 to your computer and use it in GitHub Desktop.
Solved: Unable to render rich display for Jupyter Notebook ipynb on GitHub!

Last year GitHub launched rich diffs for Jupyter Notebooks

Unfortunately, GitHub's notebook rendering can often run into following errors -

  • "Unable to render code block"
  • "Sorry, this is too big to display"
  • "Unable to render rich display"
  • "The notebook took too long to render"
  • "Sorry, something went wrong. Reload?"
  • etc.

Solutions

1. NBviewer

If your notebooks are in a public GitHub repository, you can use NBviewer to render the notebooks. Simply copy-paste the GitHub URL & NBviewer will render it for you. NBviewer will render standalone notebook files but won't render rich diffs.

2. ReviewNB

ReviewNB is a GitHub approved marketplace app that enables code reviews on Jupyter Notebooks. It works on public & private GitHub repositories. It renders rich notebook diffs for GitHub PRs & lets you review / comment on the rich diff. It's a paid SaaS app but free for open source & academic use.

3. nbdime

If you simply want to see rich notebook diffs locally, then nbdime library can generate local diffs for you. It's good for looking at diffs at development time (prior to commit-ing your notebooks) but not good for reviewing pull request diffs as you can't comment / review the PR.

Conclusion

The above tools would enhance your Jupyter Notebook GitHub integration workflow. They address various aspects of working with Jupyter Notebooks on GitHub, from viewing noteooks to reviewing changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment