jupyter / nbviewer

nbconvert as a web service: Render Jupyter Notebooks as static web pages
https://nbviewer.jupyter.org
Other
2.22k stars 551 forks source link

got 400: bad request to git repo with LFS enabled #664

Open tarokiritani opened 7 years ago

tarokiritani commented 7 years ago

My jupyter notebook renders ok on github, but not on nbviewer. I got error "400: Bad Request".

My notebook is here:

https://github.com/tarokiritani/in-vivo-wcr/blob/master/electrophysiology.ipynb

parente commented 7 years ago

The notebook is stored in Git LFS. It's likely the current nbviewer implementation doesn't support fetching from that.

tarokiritani commented 7 years ago

Yes, it is a very large (>100 MB) notebook. Thanks a lot for looking into the issue.

Honghe commented 6 years ago

@parente Does nbviewer have a plan to support Git LFS ipynb?

parente commented 6 years ago

Hi @Honghe. I'm not aware of any plans. nbviewer is largely in maintenance mode at the moment. If someone submits a PR adding LFS support and some basic tests to ensure there are no regressions in other features, we can work to get it included.

banesullivan commented 5 years ago

+1 for LFS support.

This is needed with the recent support for rendering panel outputs

ed1d1a8d commented 5 years ago

Workaround

  1. Get the link to the raw notebook, OP's raw notebook link would be: https://github.com/tarokiritani/in-vivo-wcr/raw/master/electrophysiology.ipynb
  2. Put that link through a link shortener, something like bit.ly.
  3. Paste the shortened link into https://nbviewer.jupyter.org/

Explanation

Note that step 2 is actually very important. If you do not do this then nbviewer does not treat your link like a generic URL, but rather tries to interpret in a special github way. Indeed https://nbviewer.jupyter.org/url/github.com/tarokiritani/in-vivo-wcr/raw/master/electrophysiology.ipynb will automatically redirect to https://nbviewer.jupyter.org/github/tarokiritani/in-vivo-wcr/raw/master/electrophysiology.ipynb, which is broken.