Home > Back-end >  ModuleNotFoundError: No module named 'jsonschema.compat'
ModuleNotFoundError: No module named 'jsonschema.compat'

Time:10-04

I have been working with the Bybit API for the last week when I encountered the title problem yesterday. I have started a new env and installed only the bybit wrapper again and the issue still arises. From what I can see I have jsonschema installed and in my env PATH. It was working a few days ago, so I do believe this to be separate from whatever API I am trying to use. Included is a picture of the response when run in an interpreter. Any help would be greatly appreciated.

ModuleNotFoundError: No module named 'jsonschema.compat' is the error that comes up.

enter image description here

CodePudding user response:

That module was removed in jsonschema 4.0. Your packages haven't been pinned to only use jsonschema 3.x, so that might happen.

For now, you can downgrade to version 3.x of the jsonschema package with

pip install -U 'jsonschema<4.0'

and things should work.

CodePudding user response:

I have exactly the same problem! It was working before the release of 1.3, with the version 1.21 months a go. I found this problem to day after updateing my venv to the newest versions. Search a little more, it is a problem with the version of the jsonschema-4.0.1, go back to version 3.1.1 of jsonschema and all is running like befor, incl. the version 1.3 of bybit. Regards,

  • Related