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
Hitting this exception when loading a flow on startup:
INFO 2024-12-18 20:32:01 - INFO - setup - Loading flow from file: INIT_6.1_clean.json setup.py:558
ERROR 2024-12-18 20:32:01 - ERROR - deps - An error occurred during the session scope.Traceback (most recent call last): deps.py:203
File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1815, in _execute_context
context = constructor(
-> <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.sqlite.aiosqlite.SQLiteExecutionContext_a...
File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1476, in _init_compiled
flattened_processors(compiled_params)
| -> {'id_1': '4d4388cf-052b-4bdc-b51f-e07630d34a2d'}
-> {'id_1': <function Uuid.bind_processor.<locals>.process at 0xffff10dbe520>}
File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/sql/sqltypes.py", line 3631, in process
value = value.hex
-> '4d4388cf-052b-4bdc-b51f-e07630d34a2d'
AttributeError: 'str' object has no attribute 'hex'
The flow was exported using the same version of LangFlow (though it was initially imported from an earlier version).
I've hit this in a couple of different versions of LangFlow but most recently in langflowai/langflow-ep:v1.1.1.dev11.
Create a ./flows directory and put this flow in it: Ingest_6.5_clean.json
(Note that this flow was created with this latest version of LangFlow. I've tried others as well and still hit the same exception.)
Start LangFlow with this docker-compose.yaml file:
The error you're encountering, 'str' object has no attribute 'hex', suggests that a string is being processed where a UUID object is expected. This typically happens when the system attempts to call the hex method on a string, which is not valid.
Here are a few steps you can take to troubleshoot and potentially resolve this issue:
Check UUID Handling: Ensure that the UUIDs in your flow file are being correctly handled as UUID objects rather than strings. This might involve checking the code where UUIDs are processed to ensure they are converted to UUID objects using Python's uuid module.
Flow File Compatibility: Since the flow was initially imported from an earlier version, there might be compatibility issues. LangFlow 1.0 introduced several changes, including how flows are structured and processed [1]. Ensure that your flow file is compatible with the current version by following any migration guides provided by LangFlow.
Database Interaction: Verify that the database interactions are correctly handling UUIDs. The expected data type for UUIDs in LangFlow's database interactions is UUID, and the system should ensure correct type handling by using the UUID type from Python's uuid module [2].
Update LangFlow: If possible, try updating to the latest version of LangFlow, as there might be bug fixes or improvements related to UUID handling.
Review Logs: Check the detailed logs you provided for any additional context or errors that might give more insight into where the issue is occurring.
If these steps do not resolve the issue, you may need to look into the specific code handling UUIDs in your setup or consult any recent changes in the LangFlow codebase that might affect UUID processing.
Bug Description
Hitting this exception when loading a flow on startup:
The flow was exported using the same version of LangFlow (though it was initially imported from an earlier version).
I've hit this in a couple of different versions of LangFlow but most recently in
langflowai/langflow-ep:v1.1.1.dev11
.More detailed log is here:
docker-compose-sqlite2.log
Reproduction
Create a ./flows directory and put this flow in it:
Ingest_6.5_clean.json
(Note that this flow was created with this latest version of LangFlow. I've tried others as well and still hit the same exception.)
Start LangFlow with this docker-compose.yaml file:
Expected behavior
LangFlow should start normally and load the flow file without exceptions.
Who can help?
@jordanrfrazier
Operating System
M1 Mac
Langflow Version
langflowai/langflow-ep:v1.1.1.dev11
Python Version
3.10
Screenshot
No response
Flow File
(Link is above)
The text was updated successfully, but these errors were encountered: