You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't remove a flow that 1) ran successfully once and 2) thrown an exception later.
It looks like the application state is broken for that flow and the API returns the flowing error:
(psycopg.errors.NotNullViolation) null value in column "flow_id" of relation "vertex_build" violates not-null constraint
DETAIL: Failing row contains (2024-12-23 14:00:32.353404, ChatInput-WZqts, {"results": {"message": {"text_key": "text", "data": {"timestamp..., {"message": "Hello", "sender": "User", "sender_name": "User", "f..., - Files: []
Message: Hello
Sender: User
Sender Name: User
..., t, null, bc2a8ae8-4e52-4141-baff-ac0587b4fa97).
[SQL: UPDATE vertex_build SET flow_id=%(flow_id)s::UUID WHERE vertex_build.build_id = %(vertex_build_build_id)s::UUID]
[parameters: {'flow_id': None, 'vertex_build_build_id': UUID('bc2a8ae8-4e52-4141-baff-ac0587b4fa97')}]
As you can see, the flow_id is None. However, looking the payload sent over this DELETE request, the id is being passed.
I can't figure out a way to workaround it.
Reproduction
Create a flow (like Basic Prompting) which needs a Global Variables entry
Setup the required global variable in settings
Go to the flow and run it in the playground. The important part here is that the flow runs successfully at least once
Now, go to the settings and remove the variable required by your flow
It's time to break it. Open your flow's playground and test it expecting an exception
After the error appears, go back to the flow's folder and try delete it through to context menu
Even adding the variable again and running the flow, doesn't fix the problem
Expected behavior
I aspect to be able to delete the flow regardless if the flow failed to run.
Who can help?
No response
Operating System
MacOS 15.1.1
Langflow Version
1.5.7
Python Version
3.10
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered:
Hey @dfleury! I'm here to help you with any bugs, questions, or contributions you have for Langflow. Let's tackle this issue together!
To address the issue of not being able to delete a flow in Langflow 1.5.7 due to a "null value in column 'flow_id'" error, you can use the delete_flow function from the API. This function requires a valid flow_id to delete the flow. Here's a brief overview of how it works:
Ensure Valid flow_id: Make sure the flow_id you are passing is valid and exists in the database. The error suggests that the flow_id is None, which might indicate a problem with how the flow is being referenced or stored.
Check Database Consistency: If the flow has been partially deleted or corrupted, manually check the database for inconsistencies. This might involve verifying that the flow_id is correctly associated with the flow in the database.
API Function: The delete_flow function checks if the flow exists and is associated with the current user. If the flow is found, it uses cascade_delete_flow to remove the flow and all related data from the database.
If the flow is not found, the function raises a 404 error indicating "Flow not found". Ensure that the session is properly handling the flow's transactions and that the flow is associated with the correct user [1][2].
Bug Description
I can't remove a flow that 1) ran successfully once and 2) thrown an exception later.
It looks like the application state is broken for that flow and the API returns the flowing error:
As you can see, the
flow_id
is None. However, looking the payload sent over this DELETE request, the id is being passed.I can't figure out a way to workaround it.
Reproduction
Global Variables
entryExpected behavior
I aspect to be able to delete the flow regardless if the flow failed to run.
Who can help?
No response
Operating System
MacOS 15.1.1
Langflow Version
1.5.7
Python Version
3.10
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: