got error related to pydantic at method get_workflow_state #171

Closed
opened 2026-02-16 01:16:11 -05:00 by yindo · 4 comments
Owner

Originally created by @volethanh on GitHub (Feb 13, 2025).

Hi,

I’ve got this issue from the previous version until now (0.6.1)

It’s related to pydantic WorkflowState.model_validate_json whenever the message comes to workflow

Image

I have modify the code to workaround by adding more condition to check
len(workflow_state_json) == 0

Image

I don’t know if anyone here got the same error like me ? Then should it be added to the codebase of this package?

Originally created by @volethanh on GitHub (Feb 13, 2025). Hi, I’ve got this issue from the previous version until now (0.6.1) It’s related to pydantic WorkflowState.model_validate_json whenever the message comes to workflow ![Image](https://github.com/user-attachments/assets/1ad60791-2372-4193-8a69-762e0ea1c311) I have modify the code to workaround by adding more condition to check `len(workflow_state_json) == 0` ![Image](https://github.com/user-attachments/assets/4d113b44-c47d-4a26-84fc-f98d7924fe95) I don’t know if anyone here got the same error like me ? Then should it be added to the codebase of this package?
yindo closed this issue 2026-02-16 01:16:11 -05:00
Author
Owner

@logan-markewich commented on GitHub (Feb 13, 2025):

Hmm that's weird, why was the state a dict instead of a string 🤔

@logan-markewich commented on GitHub (Feb 13, 2025): Hmm that's weird, why was the state a dict instead of a string 🤔
Author
Owner

@volethanh commented on GitHub (Feb 13, 2025):

Hmm that's weird, why was the state a dict instead of a string 🤔

I have defined deploy_core and deploy_workflow as usual

Then, I use postman to call that workflow

First request is to create sessionId
Image

Then second request is to call and pass param to the specific workflow

Image

@volethanh commented on GitHub (Feb 13, 2025): > Hmm that's weird, why was the state a dict instead of a string 🤔 I have defined deploy_core and deploy_workflow as usual Then, I use postman to call that workflow First request is to create sessionId ![Image](https://github.com/user-attachments/assets/aecac402-bbcd-4570-b5e0-3c649f4ffbc0) Then second request is to call and pass param to the specific workflow ![Image](https://github.com/user-attachments/assets/c4eb0106-7324-4b23-a2ca-04da2ffdf930)
Author
Owner

@masci commented on GitHub (Feb 14, 2025):

@volethanh I think the problem is you're passing sessionID in the task_id field in your second request. I opened https://github.com/run-llama/llama_deploy/pull/465 to raise a specific error when this happens.

@masci commented on GitHub (Feb 14, 2025): @volethanh I think the problem is you're passing `sessionID` in the `task_id` field in your second request. I opened https://github.com/run-llama/llama_deploy/pull/465 to raise a specific error when this happens.
Author
Owner

@masci commented on GitHub (Mar 6, 2025):

I'm closing this, feel free to reopen if the problem persists

@masci commented on GitHub (Mar 6, 2025): I'm closing this, feel free to reopen if the problem persists
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#171