Stream-Framework icon indicating copy to clipboard operation
Stream-Framework copied to clipboard

ImportError: cannot import name 'BasePipeline' from 'redis.client' (/home/ian/.local/lib/python3.8/site-packages/redis/client.py)

Open iajzenszmi opened this issue 4 years ago • 1 comments

ImportError: cannot import name 'BasePipeline' from 'redis.client' (/home/ian/.local/lib/python3.8/site-packages/redis/client.py)

ian@ian-HP-Stream-Laptop-11-y0XX:~/stream-framework/Stream-Framework$ python3 Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from stream_framework.activity import Activity

def create_activity(pin): ... activity = Activity( ... pin.user_id, ... PinVerb, ... pin.id, ... pin.influencer_id, ... time=make_naive(pin.created_at, pytz.utc), ... extra_context=dict(item_id=pin.item_id) ... ) ... return activity ... from stream_framework.feeds.redis import RedisFeed Traceback (most recent call last): File "", line 1, in File "/home/ian/stream-framework/Stream-Framework/stream_framework/feeds/redis.py", line 2, in from stream_framework.storage.redis.activity_storage import RedisActivityStorage File "/home/ian/stream-framework/Stream-Framework/stream_framework/storage/redis/activity_storage.py", line 2, in from stream_framework.storage.redis.structures.hash import ShardedHashCache File "/home/ian/stream-framework/Stream-Framework/stream_framework/storage/redis/structures/hash.py", line 1, in from stream_framework.storage.redis.structures.base import RedisCache File "/home/ian/stream-framework/Stream-Framework/stream_framework/storage/redis/structures/base.py", line 2, in from redis.client import BasePipeline ImportError: cannot import name 'BasePipeline' from 'redis.client' (/home/ian/.local/lib/python3.8/site-packages/redis/client.py)

iajzenszmi avatar Dec 17 '21 10:12 iajzenszmi

@iajzenszmi which version of redis package are you using. I guess the 2.10 should do the trick pip install redis==2.10.0

manoj-nandakumar avatar Feb 24 '22 04:02 manoj-nandakumar