-
-
Notifications
You must be signed in to change notification settings - Fork 577
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 importing jsonschema after release 4.22.0 #1254
Comments
I don't use poetry but it certainly should work, I have no issues here. Why are you specifying Specifically this works fine here:
The same of course works with |
Hi, I can confirm that I've experienced this as well.
This installs the library in version 4.22.0. Then in my python script I call
And get the same Traceback as @miguel-mi-silva . |
Please provide something which reproduces. |
we also have the same problem, poetry 1.7.1 and python 3.10. [[package]]
name = "jsonschema"
-version = "4.21.1"
-description = "An implementation of JSON Schema validation for Python"
-optional = false
-python-versions = ">=3.8"
-files = [
- {file = "jsonschema-4.21.1-py3-none-any.whl", hash = "sha256:7996507afae316306f9e2290407761157c6f78002dcf7419acb99822143d1c6f"},
- {file = "jsonschema-4.21.1.tar.gz", hash = "sha256:85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5"},
-]
-
-[package.dependencies]
-attrs = ">=22.2.0"
-importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""}
-jsonschema-specifications = ">=2023.03.6"
-pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""}
-referencing = ">=0.28.4"
-rpds-py = ">=0.7.1"
-
-[package.extras]
-format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"]
-format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"]
-
-[package.source]
-type = "legacy"
-url = "https://pypi.cartwatch.de/simple"
-reference = "signatrix"
-
-[[package]]
-name = "jsonschema-specifications"
-version = "2023.12.1"
-description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry"
+version = "4.22.0"
+description = ""
optional = false
-python-versions = ">=3.8"
+python-versions = "*"
files = [
- {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"},
- {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"},
+ {file = "jsonschema-4.22.0-py3-none-any.whl", hash = "sha256:ff4cfd6b1367a40e7bc6411caec72effadd3db0bbe5017de188f2d6108335802"},
+ {file = "jsonschema-4.22.0.tar.gz", hash = "sha256:5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7"},
]
-[package.dependencies]
-importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""}
-referencing = ">=0.31.0"
-
[package.source]
type = "legacy" |
I also had this issue, the suggested solution of pinning jsonschema to <4.22.0 worked for me |
There's nothing I can really look into here without some way of reproducing -- it sounds like a poetry issue, especially given that's the situation it sounds like for all of you above? But yeah I can't really look into anything without a way to reproduce. Pinning clearly isn't a real solution to whatever is up. |
Looks like the underlying issue was with the poetry cache (at least for me). This worked and allowed me to use 4.22.0: |
The issue seems to happen at least on my side only on a jfrog artifactory (with a remote setup that pulls and caches pypi packages). Trying this from pypi directly, it works ok. This is after clearing all local poetry caches. Example pyproject.toml with pull from jfrog artifactory:
After running two commands to add and upgrade jsonschema
Will try to purge the remote jfrog cache and try again but weird that this issue happens. Poetry show is also missing dependency info / python version etc. The hash between the jfrog file and the pypi are the same.
jfrog lock file
pypi lock file
|
Just to add to @hadjilucasL's comment above - I was also running into this issue when using jfrog artifactory, but clearing the caches as per my previous comment worked for me. |
Hi ! I'm using jsonschema directly in my poetry project and ran in the same issue. Clearing caches doesn't help in resolving the problem. But when deploying my project in Docker, I don't get the same error. Which mean it might be my local environnement causing the issues but I can't locate or resolve the issue ! |
If I install jsonschema version 4.22.0 as follows:
And run:
I get the following error:
I get not error if I install as follows:
The text was updated successfully, but these errors were encountered: