首页 > 数据库 >redis.exceptions.AuthenticationError: Authentication required.报错解决办法

redis.exceptions.AuthenticationError: Authentication required.报错解决办法

时间:2022-10-01 16:46:01浏览次数:70  
标签:venv lib required redis site 报错 py response

报错

...
  File "D:\UserData\PycharmProject\pythonProject\私有项目\gsCoWeChat\venv\lib\site-packages\redis\client.py", line 1239, in <lambda>
    lambda: self._send_command_parse_response(
  File "D:\UserData\PycharmProject\pythonProject\私有项目\gsCoWeChat\venv\lib\site-packages\redis\client.py", line 1215, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
  File "D:\UserData\PycharmProject\pythonProject\私有项目\gsCoWeChat\venv\lib\site-packages\redis\client.py", line 1254, in parse_response
    response = connection.read_response()
  File "D:\UserData\PycharmProject\pythonProject\私有项目\gsCoWeChat\venv\lib\site-packages\redis\connection.py", line 824, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
  File "D:\UserData\PycharmProject\pythonProject\私有项目\gsCoWeChat\venv\lib\site-packages\redis\connection.py", line 334, in read_response
    raise error
redis.exceptions.AuthenticationError: Authentication required.
...

原因

redis没有设置认证密码

解决办法

CACHES = {
    'default': {
        ...
        'OPTIONS': {
            ...
            'PASSWORD': 'yourpassword'   # 密码
        }
    }
}

标签:venv,lib,required,redis,site,报错,py,response
From: https://www.cnblogs.com/aiyablog/p/16747380.html

相关文章