'Validator' object has no attribute 'ctx'
Closed this issue · 2 comments
Vital-Fernandez commented
Today I started getting this error while creating an asdf object. If I run:
import asdf
print(f'Version asdf = {asdf.__version__}')
file_name = 'myfile.asdf'
af = asdf.AsdfFile({})
I get:
Traceback (most recent call last):
File "/home/usuario/PycharmProjects/lime/examples/tutorials/various/tests.py", line 4, in <module>
af = asdf.AsdfFile({})
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/asdf.py", line 169, in __init__
self.tree = tree
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/asdf.py", line 638, in tree
self._validate(asdf_object, custom=bool(tree))
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/asdf.py", line 665, in _validate
schema.validate(tagged_tree, self, reading=reading)
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/schema.py", line 676, in validate
validator = get_validator({} if schema is None else schema, ctx, validators, ctx._resolver, *args, **kwargs)
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/schema.py", line 588, in get_validator
return cls({} if schema is None else schema, *args, ctx=ctx, serialization_context=_serialization_context, **kwargs)
File "/home/usuario/anaconda3/envs/conda_env/lib/python3.10/site-packages/asdf/schema.py", line 267, in init
self.ctx = kwargs.pop("ctx", None)
AttributeError: 'Validator' object has no attribute 'ctx'
I wonder if anyone would have a suggestion to handle this issue.
Thank you
braingram commented
Thanks for opening an issue. Would you share the output of pip freeze
to show your asdf, jsonschema, and other library versions?
braingram commented
I'm going to close this issue but feel free to re-open it if you're still having the issue.