Traceback (most recent call last): File "/home/javad/files/github/cash_book/django_cache/store/model_redis.py", line 30, in <module> Customer.find(Customer.last_name == "Brookins").all() File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/model/model.py", line 1177, in find return FindQuery(expressions=expressions, model=cls) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/model/model.py", line 347, in __init__ if not has_redisearch(model.db()): File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 25, in has_redisearch if has_redis_json(conn): File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 17, in has_redis_json command_exists = check_for_command(conn, "json.set") File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 9, in check_for_command cmd_info = conn.execute_command("command", "info", cmd) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1238, in execute_command return conn.retry.call_with_retry( File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry return do() File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1239, in <lambda> lambda: self._send_command_parse_response( File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1215, in _send_command_parse_response return self.parse_response(conn, command_name, **options) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1260, in parse_response return self.response_callbacks[command_name](response, **options) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 550, in parse_command cmd_name = str_if_bytes(command[0]) TypeError: 'NoneType' object is not subscriptable
hello every one
when I try to run this code :
import datetime from typing import Optional from redis_om import ( Field, HashModel, Migrator )
class Customer(HashModel): ---first_name: str ---last_name: str = Field(index=True) ---join_date: datetime.date ---age: int = Field(index=True) ---bio: Optional[str]
Migrator().run() Customer.find(Customer.last_name == "Brookins").all()
Suddenly I encounter an error:
Traceback (most recent call last): File "/home/javad/files/github/cash_book/django_cache/store/model_redis.py", line 30, in <module> Customer.find(Customer.last_name == "Brookins").all() File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/model/model.py", line 1177, in find return FindQuery(expressions=expressions, model=cls) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/model/model.py", line 347, in __init__ if not has_redisearch(model.db()): File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 25, in has_redisearch if has_redis_json(conn): File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 17, in has_redis_json command_exists = check_for_command(conn, "json.set") File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis_om/checks.py", line 9, in check_for_command cmd_info = conn.execute_command("command", "info", cmd) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1238, in execute_command return conn.retry.call_with_retry( File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry return do() File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1239, in <lambda> lambda: self._send_command_parse_response( File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1215, in _send_command_parse_response return self.parse_response(conn, command_name, **options) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 1260, in parse_response return self.response_callbacks[command_name](response, **options) File "/home/javad/files/github/cash_book/env/lib/python3.10/site-packages/redis/client.py", line 550, in parse_command cmd_name = str_if_bytes(command[0]) TypeError: 'NoneType' object is not subscriptable
TypeError: 'NoneType' object is not subscriptable
Can anyone help why?