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

JLab throws "No module named 'jsonschema.protocols'" #310

Closed
Tracked by #296
dominiquesydow opened this issue Dec 30, 2022 · 3 comments · Fixed by #296
Closed
Tracked by #296

JLab throws "No module named 'jsonschema.protocols'" #310

dominiquesydow opened this issue Dec 30, 2022 · 3 comments · Fixed by #296
Assignees

Comments

@dominiquesydow
Copy link
Collaborator

With teachopencadd installation from #296, I am running into the following error under MacOS/M1 chip when calling jupyter lab (jupyter notebook works):

$ jupyter lab
Traceback (most recent call last):
  File "/Users/dominique/mambaforge/envs/toc-dev/bin/jupyter-lab", line 6, in <module>
    from jupyterlab.labapp import main
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyterlab/labapp.py", line 13, in <module>
    from jupyter_server.serverapp import flags
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyter_server/serverapp.py", line 33, in <module>
    from jupyter_events.logger import EventLogger
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyter_events/__init__.py", line 3, in <module>
    from .logger import EVENTS_METADATA_VERSION, EventLogger
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyter_events/logger.py", line 19, in <module>
    from .schema_registry import SchemaRegistry
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyter_events/schema_registry.py", line 3, in <module>
    from .schema import EventSchema
  File "/Users/dominique/mambaforge/envs/toc-dev/lib/python3.9/site-packages/jupyter_events/schema.py", line 6, in <module>
    from jsonschema.protocols import Validator
ModuleNotFoundError: No module named 'jsonschema.protocols'
@dominiquesydow
Copy link
Collaborator Author

dominiquesydow commented Dec 31, 2022

(a) Current teachopencadd environment

Cannot run JLab (see error traceback above)

jupyter                   1.0.0            py39h6e9494a_8    conda-forge
jupyter_client            7.4.8              pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.4              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.0            py39h6e9494a_0    conda-forge
jupyter_events            0.5.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.0.5              pyhd8ed1ab_1    conda-forge
jupyter_server_terminals  0.4.3              pyhd8ed1ab_0    conda-forge
jupyterlab                3.5.2              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.16.6             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.1.1              pyhd8ed1ab_0    conda-forge

jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge

@dominiquesydow
Copy link
Collaborator Author

dominiquesydow commented Dec 31, 2022

(b) Environment with only jupyterlab installed (selected packages)

CONDS_SUBDIR=osx-64 mamba create -n jlab-only-3.5.2 jupyterlab

Can run JLab.

jupyter_client            7.4.8              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.1           py311h267d04e_0    conda-forge
jupyter_events            0.5.0              pyhd8ed1ab_1    conda-forge
jupyter_server            2.0.6              pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.3              pyhd8ed1ab_0    conda-forge
jupyterlab                3.5.2              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.17.0             pyhd8ed1ab_0    conda-forge


jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge

@dominiquesydow
Copy link
Collaborator Author

Possibly, jupyter_events did not pin jsonschema in conda package; follow dependency settings as shown here:
https://github.com/jupyter/jupyter_events/blob/b9ecbf5ed0b33213d371d03bf1108c0bb5564004/pyproject.toml#L26

and pin jupyter_events to >=4.3.0

@dominiquesydow dominiquesydow linked a pull request Dec 31, 2022 that will close this issue
16 tasks
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.

1 participant