Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds blocked by JupyterLab Python package error. #623

Open
bryanpaget opened this issue May 9, 2024 · 0 comments
Open

Builds blocked by JupyterLab Python package error. #623

bryanpaget opened this issue May 9, 2024 · 0 comments
Assignees
Labels
auto-deploy Trigger manual CI steps for this PR priority/blocker triage/blocked

Comments

@bryanpaget
Copy link
Contributor

bryanpaget commented May 9, 2024

On May 06 2024 'master/main' and 'master-2.0/main-2.0' stopped building due to

Error Message:

jupyterlab | error adding extension (enabled: True): The module 'jupyterlab' could not be found (cannot import name 'get_allowed_levels' from 'jupyterlab_server.config' (/opt/conda/lib/python3.11/site-packages/jupyterlab_server/config.py)). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 322, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 186, in __init__
        self._load_metadata()
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 201, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyterlab' could not be found (cannot import name 'get_allowed_levels' from 'jupyterlab_server.config' (/opt/conda/lib/python3.11/site-packages/jupyterlab_server/config.py)). Are you sure the extension is installed?
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
Enabling: jupyter_server_proxy
- Writing config: /opt/conda/etc/jupyter
    - Validating jupyter_server_proxy...
      jupyter_server_proxy  OK
    - Extension successfully enabled.
Enabling notebook extension codefolding/main...
      - Validating: OK
Traceback (most recent call last):
  File "/opt/conda/bin/jupyter-labextension", line 6, in <module>
    from jupyterlab.labextensions import main
  File "/opt/conda/lib/python3.11/site-packages/jupyterlab/labextensions.py", line 16, in <module>
    from .commands import (
  File "/opt/conda/lib/python3.11/site-packages/jupyterlab/commands.py", line 32, in <module>
    from jupyterlab_server.config import (
ImportError: cannot import name 'get_allowed_levels' from 'jupyterlab_server.config' (/opt/conda/lib/python3.11/site-packages/jupyterlab_server/config.py)
Removing intermediate container 14b113df31e5
The command '/bin/bash -o pipefail -c pip install     'git+https://github.com/betatim/vscode-binder' &&     mamba install --quiet --yes -c conda-forge     'jupyter_contrib_nbextensions'     'dash'     'plotly'     'ipywidgets'     'markupsafe'     'ipympl'     'pexpect==4.9.0'     'jupyter-server-proxy==4.1.2'     'jupyterlab-language-pack-fr-fr'     'jupyterlab_execute_time'     'nb_conda_kernels'     'jupyterlab-lsp'     'jupyter-lsp'  &&     jupyter server extension enable --py jupyter_server_proxy &&     jupyter nbextension enable codefolding/main --sys-prefix &&     jupyter labextension enable       '@jupyterlab/translation-extension'       '@jupyterlab/server-proxy'       'nbdime-jupyterlab'     &&     jupyter lab build &&     jupyter lab clean &&   clean-layer.sh &&   rm -rf /home/$NB_USER/.cache/yarn &&   rm -rf /home/$NB_USER/.node-gyp &&   fix-permissions $CONDA_DIR &&   fix-permissions /home/$NB_USER' returned a non-zero code: 1
make: *** [Makefile:206: build/jupyterlab-cpu] Error 1
Error: Process completed with exit code 2.
##[debug]Finishing: Build image

The most important part of the error is:

jupyterlab | error adding extension (enabled: True): The module 'jupyterlab' could not be found (cannot import name 'get_allowed_levels' from 'jupyterlab_server.config' (/opt/conda/lib/python3.11/site-packages/jupyterlab_server/config.py)). Are you sure the extension is installed?

Obviously jupyterlab is installed, (see https://github.com/jupyter/docker-stacks/blob/main/images/base-notebook/Dockerfile#L42). However, installing JupyterLab (see 9b5fcc2) resolves the issue.

On May 06 2024, a new version of JupyterLab was released:

image

However, the refactored JupyerLab image builds just fine (https://github.com/StatCan/aaw-kubeflow-containers/blob/images-refactoring/dockerfiles/jupyterlab/Dockerfile) locally, so I'm assuming the issue has something to do with the way the aaw-kubeflow-containers has been designed.

TODO: understand why this happened in the first place.

@bryanpaget bryanpaget added priority/blocker triage/blocked auto-deploy Trigger manual CI steps for this PR labels May 9, 2024
@bryanpaget bryanpaget self-assigned this May 9, 2024
@bryanpaget bryanpaget linked a pull request May 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-deploy Trigger manual CI steps for this PR priority/blocker triage/blocked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant