简体   繁体   中英

redis-py AttributeError: 'PubSub' object has no attribute 'get_message'

I write the code in Windows Command Line. The code is just from Redis-py's GitHub page . 在此处输入图片说明

I don't know how this happens,so I.

dir(p)

The result is: 在此处输入图片说明

I cannot find "get_message". My redis is version -2.9.1.

get_message is not part of 2.9.1 release. It will be part of future 2.10.0 release

For 2.9.1 you should use .listen() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM