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

Error Installing @jupyter-widgets/jupyterlab-manager@3.0.1 #3307

Closed
jhamet93 opened this issue Nov 4, 2021 · 4 comments · Fixed by jupyterlab/jupyterlab#11427
Closed

Error Installing @jupyter-widgets/jupyterlab-manager@3.0.1 #3307

jhamet93 opened this issue Nov 4, 2021 · 4 comments · Fixed by jupyterlab/jupyterlab#11427

Comments

@jhamet93
Copy link

jhamet93 commented Nov 4, 2021

Description

ValueError: "@jupyter-widgets/jupyterlab-manager@3.0.1" is not a valid extension:
schemaDir is empty: "./schema"

Reproduce

jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.1 within the latest JupyterLab3 environment

Expected behavior

Lab extension successfully installs

Context

Attempting to upgrade company JupyterLab offering to 3.X so bumping this installation

@jtpio
Copy link
Member

jtpio commented Nov 4, 2021

Thanks @jhamet93 for reporting this issue 👍

I could reproduce it locally in a new environment with:

mamba create -n tmp python=3.9 jupyterlab=3 -y
conda activate tmp
jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.1

The schema seems to be correctly bundled in the source extension. So maybe it's an issue with the jupyter labextension install command and the handling of schemas.

Attempting to upgrade company JupyterLab offering to 3.X so bumping this installation

Normally this command is not stricly necessary with JupyterLab 3.0. Installing ipywidgets>=7.5 in the same environment as JupyterLab should also install the @jupyter-widgets/jupyterlab-manager extension automatically, using the prebuilt extension system added in JupyterLab 3.0.

Would you be able to check whether this fixes the issue?

@jhamet93
Copy link
Author

jhamet93 commented Nov 9, 2021

I was able to fix the issue using as you stated but in a slightly hacky manner. At Twitter, we use pexes to conceal our Python environment which means exposing the contents of this pex a bit hacky in order for the prebuilt extension system to discover the correct location.

Is still being able to install this extension via jupyter labextension install for 3.X an expected behavior ? If so, I'm happy to follow along an issue or introduce a possible pull request to resolve this.

@jtpio
Copy link
Member

jtpio commented Nov 9, 2021

Is still being able to install this extension via jupyter labextension install for 3.X an expected behavior ?

Yes this is still supported.

It looks it is hitting that line in the extension manager code in JupyterLab: https://github.com/jupyterlab/jupyterlab/blob/2b8a2cedcdb7cd4d3aac556692b146e8712a0e8f/jupyterlab/commands.py#L2078

I wonder if this is because the schemaDir in jupyterlab_widgets starts with ./ here:

"schemaDir": "./schema"

Which would make the string comparison fail. For reference the cookiecutter does not seem to be using the leading ./: https://github.com/jupyterlab/extension-cookiecutter-ts/blob/1657093417dd510665defd87006ef5a91ea4be5e/%7B%7Bcookiecutter.python_name%7D%7D/package.json#L89

@jtpio
Copy link
Member

jtpio commented Nov 10, 2021

FYI @jhamet93 jupyterlab/jupyterlab#11427 should provide a fix for this, in case you would like to check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants