python redis error
See original GitHub issueimport redis r = redis.StrictRedis(host=‘localhost’, port=6379, db=0)
as instructed in the readme file, I get this error:
File "", line 1, in
AttributeError: 'module' object has no attribute 'StrictRedis'.
just begining redis, i have this error, do have please any idea?
Issue Analytics
- State:
- Created 9 years ago
- Comments:32 (12 by maintainers)
Top Results From Across the Web
Exceptions — redis-py dev documentation
By default Redis Cluster nodes stop accepting queries if they detect there is at least a hash slot uncovered (no available node is...
Read more >redis-py/exceptions.py at master - GitHub
Error indicated CLUSTERDOWN error received from cluster. By default Redis Cluster nodes stop accepting queries if they detect there. is at least a...
Read more >Python - How to check if Redis server is available
If you want to test redis connection once at startup, use the ping() command. ... ConnectionError, ConnectionRefusedError): print("Redis connection error!
Read more >Redis®*: How to avoid error "Connection closed by server ...
The error "redis.exceptions.ConnectionError: Connection closed by server" is potentially related to the fact that your Python app doesn't exchange data with ...
Read more >Python Redis: How to handle Redis exceptions - OneLinerHub
python -redisHow to handle Redis exceptions. r = redis.Redis() try: r.set('a', [1]) except redis.RedisError as re: print(re) ... catch Redis error. print(re).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ah, you have a file named
redis.pysomewhere. Python’s import will import your redis.py module instead of a package namedredis. You need to rename the redis.py file to something else.@darksmoke You likely have a file named
redis.pysomewhere in your code base on the Python path. You’ll need to rename it.