TypeError: cannot pickle 'hiredis.Reader' object
PJ-Schulz opened this issue · comments
Philipp Jaschke commented
Hello,
I use hiredis in a pydantic BaseModel class and I get a TypeError when I run my script.
class RedisClient(BaseModel):
reader: hiredis.Reader = hiredis.Reader(encoding="utf-8", errors="strict")
class Config:
arbitrary_types_allowed = True
This is the Exception:
TypeError: cannot pickle 'hiredis.Reader' object
can Anyone help?