question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible with `jupyter-labhub`

See original GitHub issue

Bug description

As soon as I try to use a nbgitpuller Link with the jupyter-labhub Backend I only get a “Internal Server Error” and some errors in the logs. Using the “normal” backend works fine.

Expected behaviour

Normal cloning of the repo.

Actual behaviour

HTTP Status 500

How to reproduce

Start single user nb with jupyter-labhub and try to open a nbgitpuller link

Your personal set up

  • Logs
[E 2021-11-22 19:03:55.343 SingleUserLabApp web:1789] Uncaught exception GET ***Redacted***', version='HTTP/1.1', remote_ip='')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/opt/conda/lib/python3.9/site-packages/tornado/gen.py", line 216, in wrapper
        result = ctx_run(func, *args, **kwargs)
      File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/handlers.py", line 175, in get
        self.render_template(
      File "/opt/conda/lib/python3.9/site-packages/notebook/base/handlers.py", line 515, in render_template
        template = self.get_template(name)
      File "/opt/conda/lib/python3.9/site-packages/nbclassic/nbserver.py", line 140, in get_template
        return self.settings['notebook_jinja2_env'].get_template(name)
      File "/opt/conda/lib/python3.9/site-packages/jinja2/environment.py", line 997, in get_template
        return self._load_template(name, globals)
      File "/opt/conda/lib/python3.9/site-packages/jinja2/environment.py", line 958, in _load_template
        template = self.loader.load(self, name, self.make_globals(globals))
      File "/opt/conda/lib/python3.9/site-packages/jinja2/loaders.py", line 125, in load
        source, filename, uptodate = self.get_source(environment, name)
      File "/opt/conda/lib/python3.9/site-packages/jinja2/loaders.py", line 214, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: status.html

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
manicscommented, Jan 3, 2022

@fritterhoff thanks for digging into the problem, and providing a minimal example! It looks like there’s a mix of notebook and jupyter-server, I think this should fix it: https://github.com/jupyterhub/nbgitpuller/pull/240

1reaction
fritterhoffcommented, Dec 29, 2021

So I’m able to provide some instructions to reproduce the bug:

  1. Build a docker image using the following content as Dockerfile
FROM jupyter/scipy-notebook:2021-12-16
USER root

RUN pip install --no-cache-dir nbgitpuller && \
    fix-permissions "${CONDA_DIR}" && \
    fix-permissions "/home/${NB_USER}" 

USER ${NB_USER}

or even more simple:

FROM jupyter/scipy-notebook:2021-12-16

RUN pip install --no-cache-dir nbgitpuller
  1. Run the docker image using docker run --rm -it -p 8888:8888 test jupyter lab (replace the image name with your own)
  2. Try to open the jupyterlab using the printed link and afterwards try to pull a git repo (e.g. http://127.0.0.1:8888/git-pull?repo=https%3A%2F%2Fgithub.com%2Fjupyterhub%2Fnbgitpuller&urlpath=lab%2Ftree%2Fnbgitpuller%2F&branch=main)
  3. You should now see the error message in terminal where you started the jupyter lab
Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatible with JupyterLab · Issue #63 · nteract/scrapbook
I have verified compatibility of the library in Jupyter Notebooks but for some reason when I use JupyterLab on the same kernel I...
Read more >
jupyterlab/hub-extension@0.12.0" is not compatible with the ...
I want to install the littlest jupyterhub via .gitlab-ci.yml in a subdomain. Here is my .gitlab-ci.yml. I get this error message.
Read more >
jupyterlab/jupyterlab - Gitter
Types of property 'rendermime' are incompatible. Type 'IRenderMime' is not assignable to type 'RenderMime'. Types of property 'render' are incompatible.
Read more >
Python 3.6.12 Libraries for JupyterLab
This section lists the Python 3.6.12 libraries for JupyterLab that ship with ML ... Data Catalog; Data Engineering; DataFlow; Data Hub; Data Warehouse ......
Read more >
JupyterLab Changelog — JupyterLab 2.2.10 documentation
x Extension Migration Guide for help in migrating extensions to JupyterLab 2.0. Backward incompatible changes¶. Switch from @phosphor to @lumino dependencies. ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found