tschellenbach / Stream-Framework

Stream Framework is a Python library, which allows you to build news feed, activity streams and notification systems using Cassandra and/or Redis. The authors of Stream-Framework also provide a cloud service for feed technology:
https://getstream.io/
Other
4.73k stars 541 forks source link

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

Open iajzenszmi opened 2 years ago

iajzenszmi commented 2 years ago

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)

manoj-nandakumar commented 2 years ago

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