https://prefect.io logo
#prefect-community
Title
# prefect-community
j

Jehan Abduljabbar

06/23/2022, 7:32 PM
Hello, I have this problem when running a flow on the server using dask executer. (I don't have the problem when I use the server without dask, or when I use dask executer but use flow.run() from vs code rather than run from the server) So only when I use both (which I need). Here is the error I get in the server: Error during execution of task: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') This is happening for task load_data[1], which I think corresponds to when item2 is supposed to be loaded to cosmos db. Any advice is appreciated.
k

Kevin Kho

06/23/2022, 7:43 PM
Hey @Jehan Abduljabbar, can you move the code to the thread to keep the main channel cleaner? I really think this error is happening in the file loading where you do:
Copy code
item=json.load(file)
I don’t see anywhere else immediately this could happen. I think you could try commenting that out and seeing if it gives a different error
j

Jehan Abduljabbar

06/23/2022, 7:55 PM
Hi, thank you for the reply. Sorry I am new to slack, I can see the thread & my message in it but don't know how to move this from the main channel. Should I delete it? I agree with you that the error happening there. What is confusing to me is that it doesn't happen when I don't use the server, or when I use the server but not dask. I also checked the file right after the task failed, the file had the content as it is supposed to. If I comment out that part, container.upsert() would give an error because I would be trying to upsert an item that doesn't exist.
k

Kevin Kho

06/23/2022, 8:05 PM
No need to delete. You can edit the message and trim it. I don’t think we need the code anymore. I would check Python versions that you registered with and what the flow is running. Seems like there can be some kind of serialization/deserialization mismatch
j

Jehan Abduljabbar

06/23/2022, 8:09 PM
Thanks
7 Views