yasyf / summ

GPT-based Conversation Summarizer
https://summ.rtfd.io
GNU Affero General Public License v3.0
146 stars 6 forks source link

Error running `summ-example` with redisearch #4

Closed jeanmw closed 1 year ago

jeanmw commented 1 year ago

Hi! Super excited to try this out. I am running into this issue after installing all dependencies (and reinstalling as prompted with brew reinstall yasyf/summ/redis-stack. I'm using python 3.11.2. Redis / redis-stack is running.

I've tried reinstalling a few times, and installing with brew and pip. Traceback:

Starting up, please hold...
Traceback (most recent call last):
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/summ/__init__.py", line 30, in <module>
    if not checks.has_redisearch():
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis_om/checks.py", line 25, in has_redisearch
    if has_redis_json(conn):
       ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis_om/checks.py", line 17, in has_redis_json
    command_exists = check_for_command(conn, "json.set")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis_om/checks.py", line 9, in check_for_command
    cmd_info = conn.execute_command("command", "info", cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/client.py", line 1258, in execute_command
    return conn.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/retry.py", line 46, in call_with_retry
    return do()
           ^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/client.py", line 1259, in <lambda>
    lambda: self._send_command_parse_response(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/client.py", line 1235, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/client.py", line 1285, in parse_response
    return self.response_callbacks[command_name](response, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/redis/client.py", line 553, in parse_command
    cmd_name = str_if_bytes(command[0])
                            ~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/summ-example", line 5, in <module>
    from summ.tools.example import main
  File "/usr/local/Cellar/summ-lib/0.1.14/libexec/lib/python3.11/site-packages/summ/__init__.py", line 33, in <module>
    raise Exception(
Exception: Redisearch not installed. Try `brew reinstall yasyf/summ/redis-stack
yasyf commented 1 year ago

@jeanmw if you run brew services, can you share the output?

jeanmw commented 1 year ago

yep!

jeanweatherwax@test summ % brew services
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
Name          Status  User           File
dbus          none                   
dnsmasq       none    root           
httpd         none    root           
mariadb       started jeanweatherwax ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
memcached     started jeanweatherwax ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
php@7.4       none                   
postgresql@11 none                   
postgresql@15 started jeanweatherwax ~/Library/LaunchAgents/homebrew.mxcl.postgresql@15.plist
redis         started jeanweatherwax ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
redis-stack   started jeanweatherwax ~/Library/LaunchAgents/homebrew.mxcl.redis-stack.plist
unbound       none                   
jeanweatherwax@test summ % 
jeanmw commented 1 year ago

@yasyf any update on this? thanks!

yasyf commented 1 year ago

@jeanmw I think your existing redis installation is conflicting. Try brew services stop redis, brew services restart redis-stack