-
Notifications
You must be signed in to change notification settings - Fork 23
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
AttributeError in jsonschema #329
Comments
Hi! There has been discussion of this on the tskit Slack recently. That discussion said:
Here is the tskit issue that was opened: So for now you can resolve this by reverting to an older jsonschema, and you may wish to watch that other issue to see what happens with it. @petrelharp I'll leave this for you to close as you wish. |
Hi, I ran into the same issue. Running |
Yep, thanks, all! This is an upstream issue with tskit (we can tell because the last packagereferenced before jsonschema is tskit:)
|
Hi,
I just installed pyslim to use with msprime and when I import pyslim, I am hit with tracebacks and an attribute error:
>>> import pyslim Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/pyslim/__init__.py", line 4, in <module> from pyslim.slim_metadata import * # NOQA ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/pyslim/slim_metadata.py", line 438, in <module> slim_metadata_schemas = {k: tskit.MetadataSchema(_raw_slim_metadata_schemas[k]) for k in _raw_slim_metadata_schemas} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/pyslim/slim_metadata.py", line 438, in <dictcomp> slim_metadata_schemas = {k: tskit.MetadataSchema(_raw_slim_metadata_schemas[k]) for k in _raw_slim_metadata_schemas} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/tskit/metadata.py", line 639, in __init__ codec_instance = codec_cls(schema) ^^^^^^^^^^^^^^^^^ File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/tskit/metadata.py", line 580, in __init__ StructCodecSchemaValidator.check_schema(schema) File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/jsonschema/validators.py", line 301, in check_schema for error in validator.iter_errors(schema): File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/jsonschema/validators.py", line 368, in iter_errors for error in errors: File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/tskit/metadata.py", line 196, in binary_format_validator yield from jsonschema._validators.type(validator, types, instance, schema) ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ans6160/anaconda3/envs/msprime/lib/python3.11/site-packages/jsonschema/__init__.py", line 105, in __getattr__ raise AttributeError(f"module {__name__} has no attribute {name}") AttributeError: module jsonschema has no attribute _validators. Did you mean: 'validators'?
pyslim version: 1.0.4
msprime version: 1.2.0
I am not sure how to resolve this issue. Any help would be greatly appreciated!
-Abby
The text was updated successfully, but these errors were encountered: