Open khiemdoan opened 1 year ago
that is because the __init__()
in the class is synchronous but the has_redissearch()
method is async.
A way to solve it would either change the class to have an async instance or to run that function using asyncio.run()
check this source for more info.
https://stackoverflow.com/questions/33128325/how-to-set-class-attribute-with-await-in-init
I got this error without any detail or trace stack:
I commented out these lines in
aredis_om/model/model.py
and my code run as I expected:https://github.com/redis/redis-om-python/blob/87d3a080adf6e9dc2bda1b38204b5b341876f16e/aredis_om/model/model.py#L358-L363