Hi I am running in some issues using JSONSerialize...
# prefect-community
d
Hi I am running in some issues using JSONSerializer. I am running a task with the following params:
Copy code
cache_key_fn=task_input_hash,
cache_expiration=timedelta(hours=2),
persist_result=True,
result_storage=LocalFileSystem(basepath=os.path.join(os.path.expanduser("~"), ".prefect_storage")),
result_serializer=JSONSerializer(jsonlib="orjson"),
I am receiving an error messsage.
TypeError: orjson.loads() takes no keyword arguments
I looked at the implementation of JsonSerilizer
prefect/serializers.py/JSONSerializer/loads
method
The default value of te object_decoder is being set
Prefect version: 2.8.6
json
has no issues with this. Kinda weird cuz i picked up
orjson
from the documentations and it failed.
z
Hey! Yeah orjson doesn’t support object hooks so you need to disable them
d
yes ive moved to using json