https://prefect.io logo
z

Zhibin Dai

02/28/2022, 8:14 PM
Hi all. I have a task that returns a json. However, when I try to convert it into a python dict, I get this error. is there a way to do this conversion?
Copy code
TypeError: the JSON object must be str, bytes or bytearray, not FunctionTask
k

Kevin Kho

02/28/2022, 8:16 PM
It seems you are trying to convert this inside the Flow object. The conversion is happening during build time but you want it during runtime. You need to wrap the conversion as a task and use it in the Flow in order for this to work
z

Zhibin Dai

02/28/2022, 8:17 PM
ah ok, ill try that