BUG: No module named 'jsonschema.compat' on import neptune
See original GitHub issueDescribe the bug
ModuleNotFoundError
raised on import neptune
or import pytorch_lightning
Reproduction
Expected behavior
No error should be raised
Traceback
>>> import neptune
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/neptune/__init__.py", line 27, in <module>
from neptune.internal.api_clients import backend_factory
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/neptune/internal/api_clients/__init__.py", line 17, in <module>
from neptune.internal.api_clients.hosted_api_clients.hosted_backend_api_client import HostedNeptuneBackendApiClient
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/neptune/internal/api_clients/hosted_api_clients/hosted_backend_api_client.py", line 26, in <module>
from bravado.exception import HTTPNotFound
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/bravado/exception.py", line 3, in <module>
from bravado_core.response import IncomingResponse
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/bravado_core/response.py", line 10, in <module>
from bravado_core.unmarshal import unmarshal_schema_object
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/bravado_core/unmarshal.py", line 17, in <module>
from bravado_core.model import MODEL_MARKER
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/bravado_core/model.py", line 13, in <module>
from swagger_spec_validator.ref_validators import attach_scope
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/swagger_spec_validator/__init__.py", line 8, in <module>
from swagger_spec_validator.util import validate_spec_url
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/swagger_spec_validator/util.py", line 9, in <module>
from swagger_spec_validator import validator12
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/swagger_spec_validator/validator12.py", line 29, in <module>
from swagger_spec_validator.ref_validators import default_handlers
File "/home/luca/Projects/CookieTesting/testing/venv/lib/python3.8/site-packages/swagger_spec_validator/ref_validators.py", line 14, in <module>
from jsonschema.compat import iteritems
ModuleNotFoundError: No module named 'jsonschema.compat'
Environment
The output of pip list
:
❯ pip list
Package Version
---------------------- ---------
arrow 1.1.1
attrs 21.2.0
boto3 1.18.51
botocore 1.21.51
bravado 11.0.3
bravado-core 5.17.0
certifi 2021.5.30
charset-normalizer 2.0.6
click 8.0.1
fqdn 1.5.1
future 0.18.2
gitdb 4.0.7
GitPython 3.1.24
idna 3.2
isoduration 20.11.0
jmespath 0.10.0
jsonpointer 2.1
jsonref 0.2
jsonschema 4.0.0
monotonic 1.6
msgpack 1.0.2
neptune-client 0.10.0
numpy 1.21.2
oauthlib 3.1.1
packaging 21.0
pandas 1.3.3
Pillow 8.3.2
pip 20.1.1
psutil 5.8.0
PyJWT 2.1.0
pyparsing 2.4.7
pyrsistent 0.18.0
python-dateutil 2.8.2
pytz 2021.1
PyYAML 5.4.1
requests 2.26.0
requests-oauthlib 1.3.0
rfc3339-validator 0.1.4
rfc3987 1.3.8
s3transfer 0.5.0
setuptools 47.1.0
simplejson 3.17.5
six 1.16.0
smmap 4.0.0
swagger-spec-validator 2.7.3
typing-extensions 3.10.0.2
uri-template 1.1.0
urllib3 1.26.7
webcolors 1.11.1
websocket-client 1.2.1
The operating system you’re using: Ubuntu
The output of python --version
: Python 3.8.5
Additional context
Yesterday everything worked correctly
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Bug: ModuleNotFoundError: No module named 'jsonschema ...
I'm currently getting the error - ModuleNotFoundError: No module named 'jsonschema.compat' I think this first started today.
Read more >ModuleNotFoundError: No module named 'jsonschema.compat'
I have started a new env and installed only the bybit wrapper again and the issue still arises. From what I can see...
Read more >[Fixed] ModuleNotFoundError: No module named 'jsonschema'
How to Fix “ModuleNotFoundError: No module named 'jsonschema'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >Changelog - neptune.ai documentation
We fixed a bug that crashed the integration when the input layer of a neural network didn't have the input_shape parameter defined or...
Read more >Bug #1946321 “'jsonschema' has no attribute 'compat'”
it's not that the validator is not being called, if the issue is not happening it means that the newest (>3.2.0) jsonschema wasn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I confirm with neptune
0.12.0
the problem is fixedThanks! Closing this issue as solved.