---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
264 spec_value = cls._variant_registry.enum(data_field)
--> 265 spec_class = cls._variant_registry.registered_classes[spec_value]
266 except Exception:
KeyError: <Key.verified: 'verified'>
During handling of the above exception, another exception occurred:
SpecClassIdentificationError Traceback (most recent call last)
/tmp/ipykernel_26997/4196115752.py in <module>
----> 1 for pool in client.find_pools(PoolSearchRequest(status=[toloka.pool.Pool.Status.OPEN])):
pass
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/util/_codegen.py in wrapped(*args, **kwargs)
222 fit, func_problem = _check_arg_type_compatibility(func_sig, arg_name, arg_type, bound)
223 if fit:
--> 224 return func(*args, **kwargs)
225 else:
226 return func(*args, **kwargs)
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/util/_managing_headers.py in wrapped(*args, **kwargs)
53 stack.enter_context(SetVariable(top_level_method_var, func.__name__))
54
---> 55 return func(*args, **kwargs)
56
57 return wrapped
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/__init__.py in find_pools(self, request, sort, limit)
1466 sort = None if sort is None else structure(sort, search_requests.PoolSortItems)
1467 response = self._search_request('get', '/v1/pools', request, sort, limit)
-> 1468 return structure(response, search_results.PoolSearchResult)
1469
1470 @add_headers('client')
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in structure(self, obj, cl)
292 """Convert unstructured Python data structures to structured data."""
293
--> 294 return self._structure_func.dispatch(cl)(obj, cl)
295
296 # Classes to Python primitives.
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/_converter.py in <lambda>(data, type_)
15 converter.register_structure_hook_func(
16 lambda type_: hasattr(type_, 'structure'),
---> 17 lambda data, type_: type_.structure(data) # type: ignore
18 )
19 converter.register_unstructure_hook_func( # type: ignore
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
279 value = data.pop(key)
280 if field.type is not None:
--> 281 value = converter.structure(value, field.type)
282
283 kwargs[field.name] = value
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in structure(self, obj, cl)
292 """Convert unstructured Python data structures to structured data."""
293
--> 294 return self._structure_func.dispatch(cl)(obj, cl)
295
296 # Classes to Python primitives.
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in _structure_optional(self, obj, union)
523 )
524 # We can't actually have a Union of a Union, so this is safe.
--> 525 return self._structure_func.dispatch(other)(obj, other)
526
527 def _structure_union(self, obj, union):
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in _structure_list(self, obj, cl)
470 else:
471 elem_type = cl.__args__[0]
--> 472 return [
473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in <listcomp>(.0)
471 elem_type = cl.__args__[0]
472 return [
--> 473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
475 ]
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/_converter.py in <lambda>(data, type_)
15 converter.register_structure_hook_func(
16 lambda type_: hasattr(type_, 'structure'),
---> 17 lambda data, type_: type_.structure(data) # type: ignore
18 )
19 converter.register_unstructure_hook_func( # type: ignore
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
279 value = data.pop(key)
280 if field.type is not None:
--> 281 value = converter.structure(value, field.type)
282
283 kwargs[field.name] = value
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in structure(self, obj, cl)
292 """Convert unstructured Python data structures to structured data."""
293
--> 294 return self._structure_func.dispatch(cl)(obj, cl)
295
296 # Classes to Python primitives.
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in _structure_optional(self, obj, union)
523 )
524 # We can't actually have a Union of a Union, so this is safe.
--> 525 return self._structure_func.dispatch(other)(obj, other)
526
527 def _structure_union(self, obj, union):
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/_converter.py in <lambda>(data, type_)
15 converter.register_structure_hook_func(
16 lambda type_: hasattr(type_, 'structure'),
---> 17 lambda data, type_: type_.structure(data) # type: ignore
18 )
19 converter.register_unstructure_hook_func( # type: ignore
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
80 return FilterOr.structure(data)
81 if 'and' in data:
---> 82 return FilterAnd.structure(data)
83 else:
84 return Condition.structure(data)
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
130 @classmethod
131 def structure(cls, data):
--> 132 return super(FilterCondition, cls).structure(data)
133
134
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
279 value = data.pop(key)
280 if field.type is not None:
--> 281 value = converter.structure(value, field.type)
282
283 kwargs[field.name] = value
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in structure(self, obj, cl)
292 """Convert unstructured Python data structures to structured data."""
293
--> 294 return self._structure_func.dispatch(cl)(obj, cl)
295
296 # Classes to Python primitives.
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in _structure_list(self, obj, cl)
470 else:
471 elem_type = cl.__args__[0]
--> 472 return [
473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in <listcomp>(.0)
471 elem_type = cl.__args__[0]
472 return [
--> 473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
475 ]
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/_converter.py in <lambda>(data, type_)
15 converter.register_structure_hook_func(
16 lambda type_: hasattr(type_, 'structure'),
---> 17 lambda data, type_: type_.structure(data) # type: ignore
18 )
19 converter.register_unstructure_hook_func( # type: ignore
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
78 def structure(cls, data: dict):
79 if 'or' in data:
---> 80 return FilterOr.structure(data)
81 if 'and' in data:
82 return FilterAnd.structure(data)
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
106 @classmethod
107 def structure(cls, data):
--> 108 return super(FilterCondition, cls).structure(data)
109
110
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
279 value = data.pop(key)
280 if field.type is not None:
--> 281 value = converter.structure(value, field.type)
282
283 kwargs[field.name] = value
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in structure(self, obj, cl)
292 """Convert unstructured Python data structures to structured data."""
293
--> 294 return self._structure_func.dispatch(cl)(obj, cl)
295
296 # Classes to Python primitives.
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in _structure_list(self, obj, cl)
470 else:
471 elem_type = cl.__args__[0]
--> 472 return [
473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
~/venv/jupyter_3.9/lib/python3.9/site-packages/cattr/converters.py in <listcomp>(.0)
471 elem_type = cl.__args__[0]
472 return [
--> 473 self._structure_func.dispatch(elem_type)(e, elem_type)
474 for e in obj
475 ]
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/_converter.py in <lambda>(data, type_)
15 converter.register_structure_hook_func(
16 lambda type_: hasattr(type_, 'structure'),
---> 17 lambda data, type_: type_.structure(data) # type: ignore
18 )
19 converter.register_unstructure_hook_func( # type: ignore
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
82 return FilterAnd.structure(data)
83 else:
---> 84 return Condition.structure(data)
85
86
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
155 @classmethod
156 def structure(cls, data):
--> 157 return super(FilterCondition, cls).structure(data)
158
159
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
267 raise SpecClassIdentificationError(spec_field=spec_field,
268 spec_enum=cls._variant_registry.enum.__name__)
--> 269 return spec_class.structure(data)
270
271 data = copy(data)
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/filter.py in structure(cls, data)
155 @classmethod
156 def structure(cls, data):
--> 157 return super(FilterCondition, cls).structure(data)
158
159
~/venv/jupyter_3.9/lib/python3.9/site-packages/toloka/client/primitives/base.py in structure(cls, data)
265 spec_class = cls._variant_registry.registered_classes[spec_value]
266 except Exception:
--> 267 raise SpecClassIdentificationError(spec_field=spec_field,
268 spec_enum=cls._variant_registry.enum.__name__)
269 return spec_class.structure(data)
SpecClassIdentificationError: SpecClassIdentificationError(spec_field='key', spec_enum='Key')
A week ago everything was OK. Is this the Toloka backend problem?