You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated fastapi-cache using Github to solve the problem of "not JSON serializable", but now I have a new error:
File "/lib/python3.9/site-packages/fastapi_cache/decorator.py", line 40, in inner
cache_key = key_builder(
File "/lib/python3.9/site-packages/fastapi_cache/key_builder.py", line 21, in default_key_builder
+ hashlib.md5( # nosec:B303
TypeError: Unicode-objects must be encoded before hashing
Before (with version 1.3.4) I was using something like this bellow, but with the two lines commented and returning the json_updated_user:
Without jsonable_encoder I get the error "not JSON serializable", but now I have the hash error.
If I comment the @cache decorator, it works fine (and I don't need the jsonable_encoder).
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi,
I updated fastapi-cache using Github to solve the problem of "not JSON serializable", but now I have a new error:
Before (with version 1.3.4) I was using something like this bellow, but with the two lines commented and returning the json_updated_user:
Without jsonable_encoder I get the error "not JSON serializable", but now I have the hash error.
If I comment the @cache decorator, it works fine (and I don't need the jsonable_encoder).
Thanks in advance!
The text was updated successfully, but these errors were encountered: