langflow icon indicating copy to clipboard operation
langflow copied to clipboard

occur lookup <customized bcrypt hasher> on passlib.handlers.bcrypt failed when I use RedisCache

Open neeker opened this issue 6 months ago • 1 comments

Bug Description

occur lookup on passlib.handlers.bcrypt failed when I use RedisCache:

image

Reproduction

class RedisCache(AsyncBaseCacheService, Generic[LockType]): # type: ignore

...

async def set(self, key, value, lock=None):
    """
    Add an item to the cache.

    Args:
        key: The key of the item.
        value: The value to cache.
    """
    try:
        if pickled := pickle.dumps(value):
            result = self._client.setex(str(key), self.expiration_time, pickled)
            if not result:
                raise ValueError("RedisCache could not set the value.")
    except TypeError as exc:
        raise TypeError("RedisCache only accepts values that can be pickled. ") from exc

Expected behavior

when I use RedisCache and run build buidlFlow, I got error of pickle.

Who can help?

No response

Operating System

MacOS

Langflow Version

1.0.14

Python Version

3.12

Screenshot

image

Flow File

test.json

neeker avatar Aug 09 '24 06:08 neeker