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

Issue: type object 'Draft7Validator' has no attribute 'FORMAT_CHECKER' #2857

Closed
driadi opened this issue Jan 27, 2023 · 4 comments
Closed

Issue: type object 'Draft7Validator' has no attribute 'FORMAT_CHECKER' #2857

driadi opened this issue Jan 27, 2023 · 4 comments
Labels

Comments

@driadi
Copy link

driadi commented Jan 27, 2023

Came here because I found this error when running Great Expectations and it seems that the issue occurred in v4.2.1.

I haven't verified this yet but it seems that jsonschema.Draft7Validator only has FORMAT_CHECKER attribute since jsonschema >= v4.3.0 so perhaps the requirements file in this module needs to be updated?

@driadi driadi added the bug label Jan 27, 2023
@binste
Copy link
Contributor

binste commented Jan 27, 2023

Thanks for reporting the bug! Indeed, a quick fix for anyone affected is to upgrade jsonschema.

pip install jsonschema --upgrade

@mattijn @joelostblom This is an urgent one. I already fixed it in #2812 but that PR never made its way into the 4.2.1 release. Probably because the PR was actually about something else and I just fixed this backwards compatibility issue on the side. Sorry for that! Should have kept these PRs better separated and spot it while reviewing #2844. I can't get in front of a laptop right now but I can create a PR against v4.2.X branch this evening for a v4.2.2release.

@mattijn
Copy link
Contributor

mattijn commented Jan 27, 2023

Thanks for the report @driadi. While you were running Great Expectations, me was running 'to what extend did I just break the Internet?'
No problem @binste! Thank you for willing to look into it this evening.

So currently:

  • Altair 4.2.0 works with jsonschema >=3,<4.17
  • Altair 4.2.1 works with jsonschema >=4.5.0
  • [update] Altair 4.2.2 works with jsonschema >=3

@binste
Copy link
Contributor

binste commented Jan 27, 2023

Clarification on the version compatibility:

  • Altair 4.2.0 works with jsonschema >=3,<4.17
    • jsonschema 4.17 introduced format validation on schemas which causes an issue which is fixed in Altair 4.2.1
  • Altair 4.2.1 works with jsonschema >=4.5
    • Altair 4.2.1 requires the FORMAT_CHECKER attribute on validator classes which was only introduced in jsonschema 4.5
  • Altair 4.2.2 would work with jsonschema >= 3.0

@mattijn
Copy link
Contributor

mattijn commented Jan 27, 2023

Done per https://pypi.org/project/altair/4.2.2/
Thanks again @binste!

@mattijn mattijn closed this as completed Jan 27, 2023
jairideout added a commit to onecodex/onecodex that referenced this issue Jul 14, 2023
jairideout added a commit to onecodex/onecodex that referenced this issue Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants