Hi all, I have a question regarding serializers. ...
# prefect-community
m
Hi all, I have a question regarding serializers. I use the following in a task to save the result to a
.pkl
file. The result is a dictionary with two elements (two arrays).
Copy code
@task(cache_key_fn=cache_file_based_fn,
      persist_result=True,         result_storage=LocalFileSystem(basepath=settings.main_dir+'/results'), 
      result_storage_key=settings.main_task_file,
      result_serializer="pickle",
      cache_result_in_memory=False)
Json is not supported because narrays cant be encoded with JSON. Pickle is fine with me but when I try to open the pickle file that was generated I get the following error:
UnpicklingError: invalid load key, '{'.
Any clue why this is happening? just FYI:
Copy code
settings.main_task_file = 'results.pkl'
Posted in #prefect-getting-started