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
Semi-Successfully implemented Postgresaver in my multi agent workflow. However getting huge amounts of serialisation errors when running. It doesn't "break" the code and the outputs are finally accessible but would like to fix.
Code:
connection_kwargs = {
"autocommit": True,
"prepare_threshold": 0,
}
resp = None
# Create a connection pool
with ConnectionPool(
# Example configuration
conninfo=DB_URI,
max_size=20,
kwargs=connection_kwargs,
) as pool:
checkpointer = PostgresSaver(pool)
query_graph_1 = query_workflow.compile(checkpointer = checkpointer)
resp = query_graph_1.invoke({"messages": [input_message]}, config)
Errors:
2024-09-28 14:35:42,733 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: frozenset'). Falling back to json.
2024-09-28 14:35:42,733 DEBUG:Failed to serialize <class 'frozenset'> to JSON: Object of type frozenset is not JSON serializable
2024-09-28 14:35:42,733 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: CaseInsensitiveDict'). Falling back to json.
2024-09-28 14:35:42,733 DEBUG:Failed to serialize <class 'requests.structures.CaseInsensitiveDict'> to JSON: Object of type CaseInsensitiveDict is not JSON serializable
2024-09-28 14:35:42,734 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: RequestsCookieJar'). Falling back to json.
2024-09-28 14:35:42,734 DEBUG:Failed to serialize <class 'requests.cookies.RequestsCookieJar'> to JSON: Object of type RequestsCookieJar is not JSON serializable
2024-09-28 14:35:42,734 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: HTTPAdapter'). Falling back to json.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Semi-Successfully implemented Postgresaver in my multi agent workflow. However getting huge amounts of serialisation errors when running. It doesn't "break" the code and the outputs are finally accessible but would like to fix.
Code:
Errors:
2024-09-28 14:35:42,733 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: frozenset'). Falling back to json.
2024-09-28 14:35:42,733 DEBUG:Failed to serialize <class 'frozenset'> to JSON: Object of type frozenset is not JSON serializable
2024-09-28 14:35:42,733 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: CaseInsensitiveDict'). Falling back to json.
2024-09-28 14:35:42,733 DEBUG:Failed to serialize <class 'requests.structures.CaseInsensitiveDict'> to JSON: Object of type CaseInsensitiveDict is not JSON serializable
2024-09-28 14:35:42,734 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: RequestsCookieJar'). Falling back to json.
2024-09-28 14:35:42,734 DEBUG:Failed to serialize <class 'requests.cookies.RequestsCookieJar'> to JSON: Object of type RequestsCookieJar is not JSON serializable
2024-09-28 14:35:42,734 DEBUG:Orjson serialization failed: TypeError('Type is not JSON serializable: HTTPAdapter'). Falling back to json.
Any help would be great thank you
Beta Was this translation helpful? Give feedback.
All reactions