We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python 3.9.18 hiredis 2.3.2 redis 5.0.4 redis-om 0.3.0 types-redis 4.6.0.20240425 pydantic 2.7.1 pydantic_core 2.18.2
This causes the exception
from typing import Dict from redis_om import JsonModel class ScanModel(JsonModel): info: Dict
Traceback (most recent call last): File "/home/denolf/tmp/blissdata.py", line 5, in <module> class ScanModel(JsonModel): File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/redis_om/model/model.py", line 1250, in __new__ new_class = super().__new__(cls, name, bases, attrs, **kwargs) File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/pydantic/_internal/_model_construction.py", line 115, in __new__ cls: type[BaseModel] = super().__new__(mcs, cls_name, bases, namespace, **kwargs) # type: ignore File "/home/denolf/.pyenv/versions/3.9.18/lib/python3.9/abc.py", line 106, in __new__ cls = super().__new__(mcls, name, bases, namespace, **kwargs) File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/redis_om/model/model.py", line 1813, in __init_subclass__ cls.redisearch_schema() File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/redis_om/model/model.py", line 1882, in redisearch_schema schema_parts = [schema_prefix] + cls.schema_for_fields() File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/redis_om/model/model.py", line 1903, in schema_for_fields _type = get_outer_type(field) File "/home/denolf/virtualenvs/pybox_rAqscR/lib/python3.9/site-packages/redis_om/model/model.py", line 86, in get_outer_type return field.annotation.__args__[0] File "/home/denolf/.pyenv/versions/3.9.18/lib/python3.9/typing.py", line 711, in __getattr__ raise AttributeError(attr) AttributeError: __args__
The issue does not occur with "pip install redis-om<0.3"
Python 3.9.18 hiredis 2.3.2 redis 5.0.4 redis-om 0.2.2 types-redis 4.6.0.20240425 pydantic 2.4.2 pydantic_core 2.10.1
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This causes the exception
The issue does not occur with "pip install redis-om<0.3"
The text was updated successfully, but these errors were encountered: