jupyter / nbviewer

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

Repository giving error 500 on root, 404 with weird message on files #988

Closed astrojuanlu closed 2 years ago

astrojuanlu commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://nbviewer.org/ or deploy a local instance https://github.com/jupyter/nbviewer#quick-run
  2. Type https://github.com/astrojuanlu/tutorial-sphinx-markdown/ on URL textbox
  3. Click Go!
  4. See 500 error
  5. Go back
  6. Type https://github.com/astrojuanlu/tutorial-sphinx-markdown/blob/main/slides.ipynb on URL textbox
  7. Click Go!
  8. See 404 error with message Remote HTTP 404: Not Found ({"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/git#get-a-tree"})

Expected behavior It should work like any other repository.

Additional context When run locally, I see this error message in the console:

[E 2021-10-25 16:30:37.194 NBViewer web:1793] Uncaught exception GET /github/astrojuanlu/tutorial-sphinx-markdown/ (172.17.0.1)
    HTTPServerRequest(protocol='http', host='0.0.0.0:8080', method='GET', uri='/github/astrojuanlu/tutorial-sphinx-markdown/', version='HTTP/1.1', remote_ip='172.17.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/usr/local/lib/python3.7/site-packages/nbviewer/providers/github/handlers.py", line 148, in get
        response = await self.github_client.get_repo(user, repo)
      File "/usr/local/lib/python3.7/site-packages/nbviewer/providers/github/client.py", line 72, in _log_rate_limit
        r = future.result()
      File "/usr/local/lib/python3.7/site-packages/nbviewer/client.py", line 93, in smart_fetch
        response = await self.client.fetch(request)
    tornado.httpclient.HTTPClientError: HTTP 404: Not Found

Does this have to do with the fact that the repository has one submodule?

astrojuanlu commented 2 years ago

Well, it seems to be related to this:

$ curl https://api.github.com/repos/astrojuanlu/tutorial-sphinx-markdown
{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"
}

Hardly a nbviewer issue. Closing, and sorry for the noise.