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

Draft7Validator(TyperError: create.<locals>.Validator.__init__() got an unexpected keyword argument 'registry' #1207

Closed
gokceneraslan opened this issue Jan 3, 2024 · 3 comments
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup

Comments

@gokceneraslan
Copy link

jupyter users are getting this error and it's fixed when jsonschema is downgraded from 4.20.0 to 4.19.2. There is already an issue on the jupyter side (jupyter/jupyter_core#369)

Full exception:

❯ jupyter --version
Selected Jupyter core packages...
IPython          : 8.16.0
ipykernel        : 6.25.2
ipywidgets       : not installed
jupyter_client   : 8.4.0
jupyter_core     : 5.4.0
jupyter_server   : 2.8.0
Traceback (most recent call last):
  File "/usr/bin/jupyter", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/command.py", line 261, in main
    mod = __import__(package)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyterlab/__init__.py", line 8, in <module>
    from .handlers.announcements import (
  File "/usr/lib/python3.11/site-packages/jupyterlab/handlers/announcements.py", line 14, in <module>
    from jupyter_server.base.handlers import APIHandler
  File "/usr/lib/python3.11/site-packages/jupyter_server/base/handlers.py", line 24, in <module>
    from jupyter_events import EventLogger
  File "/usr/lib/python3.11/site-packages/jupyter_events/__init__.py", line 3, in <module>
    from .logger import EVENTS_METADATA_VERSION, EventLogger
  File "/usr/lib/python3.11/site-packages/jupyter_events/logger.py", line 19, in <module>
    from .schema import SchemaType
  File "/usr/lib/python3.11/site-packages/jupyter_events/schema.py", line 18, in <module>
    from .validators import draft7_format_checker, validate_schema
  File "/usr/lib/python3.11/site-packages/jupyter_events/validators.py", line 44, in <module>
    JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator(
                                      ^^^^^^^^^^^^^^^^
TypeError: create.<locals>.Validator.__init__() got an unexpected keyword argument 'registry'
@Julian
Copy link
Member

Julian commented Jan 3, 2024

Hi, sorry you're having trouble. Please don't crosspost unless you think there's an issue here with this package -- and if/once you do, please share a minimal reproducer which reproduces the issue and with no additional dependencies installed. I'll be happy to try to help on the Jupyter issue, but the most likely initial diagnosis is (frankly but politely) user error with installing dependencies, so let's do that on the Jupyter issue.

@Julian Julian closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@gokceneraslan
Copy link
Author

Apologies, thanks!

@Julian Julian added the Invalid Not a bug, PEBKAC, or an unsupported setup label Feb 16, 2024
@samrajput1143
Copy link

it also worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup
Projects
None yet
Development

No branches or pull requests

3 participants