question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'list' object has no attribute 'encode' (no support for multi-bulk reply to SUBSCRIBE command)

See original GitHub issue

From time to time I get error:

redis_client = redis.StrictRedis.from_url('redis://localhost:6379/0')
pubsub = redis_client.pubsub()
for message in pubsub.listen():
    # ...

Traceback (most recent call last):

 [...]
  File "<MYDIR>/local/lib/python2.7/site-packages/redis/client.py", line 2215, in listen
    response = self.handle_message(self.parse_response(block=True))
  File "<MYDIR>/local/lib/python2.7/site-packages/redis/client.py", line 2232, in handle_message
    message_type = nativestr(response[0])
  File "<MYDIR>/local/lib/python2.7/site-packages/redis/_compat.py", line 19, in <lambda>
    x if isinstance(x, str) else x.encode('utf-8', 'replace')
AttributeError: 'list' object has no attribute 'encode'

Version: redis (2.10.3)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
gugucommented, Jan 24, 2017

@andymccurdy any update on this? Problem is still exists

2reactions
hp685commented, May 30, 2017

Has anyone in this thread had any luck? I’m encountering the same issue when using redis as a backend for celery. I’m using redis(2.10.5).

Read more comments on GitHub >

github_iconTop Results From Across the Web

'list' object has no attribute 'encode' (no support for multi-bulk ...
AttributeError : 'list' object has no attribute 'encode' (no support for multi-bulk reply to SUBSCRIBE command) #612.
Read more >
AttributeError: 'list' object has no attribute 'encode' (no support ...
AttributeError : 'list' object has no attribute 'encode' (no support for multi-bulk reply to SUBSCRIBE command)
Read more >
AttributeError: 'list' object has no attribute 'encode'
It contains a (Unicode) string. Try running type(tmp) and print dir(tmp) to see it for yourself. Share. Share a link to this answer....
Read more >
AttributeError: 'list' object has no attribute 'encode' | bobbyhadz
The Python AttributeError: 'list' object has no attribute 'encode' occurs when we call the `encode()` method on a list instead of a string....
Read more >
Spotipy: Attributeerror: 'List' Object Has No Attribute 'Split' - ADocLib
Python answers related to AttributeError: 'NoneType' object has no ... has no attribute 'encode' no support for multibulk reply to SUBSCRIBE command #612....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found