I have jsonschema installed through poetry.
When I attempt to use it, I get the following error:
Traceback (most recent call last):
File "/Users/danielbak/hw-sys-measurements-logging/hw_sys_measurements_logging/data_log.py", line 5, in <module>
from jsonschema import validate
File "/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/jsonschema/__init__.py", line 13, in <module>
from jsonschema._format import FormatChecker
File "/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/jsonschema/_format.py", line 11, in <module>
from jsonschema.exceptions import FormatError
File "/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/jsonschema/exceptions.py", line 15, in <module>
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/referencing/__init__.py", line 5, in <module>
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/referencing/_core.py", line 9, in <module>
from rpds import HashTrieMap, HashTrieSet, List
ImportError: cannot import name 'HashTrieMap' from 'rpds' (/Users/danielbak/Library/Caches/pypoetry/virtualenvs/hw-sys-measurements-logging-ABlvfjOw-py3.9/lib/python3.9/site-packages/rpds/__init__.py)
So it appears that poetry is not importing the correct version of rdps. How can I resolve this?
I also had another issue where jsonschema’s installation did not automatically pull in attrs
so I had to poetry add attrs
. It appears that jsonschema is not correctly pulling in its dependencies.