zoukankan      html  css  js  c++  java
  • redis包版本更新的问题

    使用redis包过程中出现如下问题:

    Traceback (most recent call last):
    File "Check_UaPool.py", line 92, in <module>
    r.srem(REDIS_KEY,IP)
    File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/redis/client.py", line 1940, in srem
    return self.execute_command('SREM', name, *values)
    File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/redis/client.py", line 774, in execute_command
    connection.send_command(*args)
    File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/redis/connection.py", line 619, in send_command
    self.send_packed_command(self.pack_command(*args))
    File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/redis/connection.py", line 659, in pack_command
    for arg in imap(self.encoder.encode, args):
    File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/redis/connection.py", line 124, in encode
    "byte, string or number first." % typename)
    redis.exceptions.DataError: Invalid input of type: 'dict'. Convert to a byte, string or number first.
    原因:python中redis包更新导致的问题,变更了srem方法的输入。

    解决方法:

    pip install redis==2.10.6
    问题得到解决。

    原文:https://blog.csdn.net/weixin_39128119/article/details/87373091

  • 相关阅读:
    oracle RAC 更换IP
    12C oracle 12.1.0.2版本打补丁
    node name配置错误,导致grid日志在报警
    input_subsys 输入子系统框架分析
    www.bing.com
    getopt函数使用说明
    FreeType 矢量字体 测试移植(1)
    字符的编码方式
    在开发板上显示字符和中文
    块设备驱动程序的框架
  • 原文地址:https://www.cnblogs.com/marry215464/p/10493683.html
Copyright © 2011-2022 走看看