-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
After updating to 4.18.1 earlier code fails with jsonschema.exceptions._RefResolutionError: 'bytes' object has no attribute 'timeout'
#1124
Comments
Same as @Alexander-Serov here, literally same problem and same temporary solution for now. |
I can't fix or address anything without some code. |
Looks like this commit is the cause. If I remove the "REMOVEME" code in |
That is essentially the only commit in the release -- but come on folks, it's bug filing 101 -- you need to include some sort of code to reproduce what you're reporting here -- all tests in this package pass, so whatever you're running needs an example. |
Made it easy to find ;-p
Sure. Like I mentioned above, still investigating. It is hard to dig into 5 levels of dependencies, in my case. |
When doing: |
Fine on 4.18.0. Breaks on 4.18.1. from jsonschema import Draft4Validator, RefResolver
class CustomRefResolver(RefResolver):
def __init__(self, *args, **kw):
super().__init__(*args, **kw)
def resolve_remote(self, uri):
return {}
schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"x": {
"$ref": "#/definitions/x"
},
"y": {
"$ref": "https://standard.open-contracting.org/schema/1__1__5/release-schema.json"
}
},
"definitions": {
"x": {"type": "string"}
}
}
list(Draft4Validator(schema, resolver=CustomRefResolver("", schema)).iter_errors({"x": 1})) yields
|
As I told you we would love to, but this is not our direct dependency :) So was hoping the others would contribute. 💪🏻 teamwork |
Great, thanks for the example, should be fixed momentarily in 4.18.2. |
Hi,
The error is happening for a pretty large FastAPI application but I'll try to deep dive to create a reproductible example (https://github.com/developmentseed/titiler/actions/runs/5529545166/jobs/10087758840) This is happening for 4.18.1 and for the newest 4.18.2 Edit: This is all coming from one of our dependency stac-utils/pystac#1186 |
Also running into the "Unresolvable JSON pointer" error for 4.18.2.
What's strange is that it seems to be searching for the fragment in the Draft-7 meta schema document instead of my local OpenAPI spec document and I'm not even using Draft-7. |
Here is the traceback. I believe something has changed in the fresh release 4.18.1 from today because our CI pipeline stopped working, the code has not be changed.
I cannot provide the minimal working example since
jsonschema
is not our direct dependency but is rather used by Great Expectations. Still, the traceback clearly suggest there is a difference in howjsonschema
is implemented.We downgraded back to 4.17.* and it fixes the problem.
The text was updated successfully, but these errors were encountered: