sqlite3.InterfaceError: bad parameter or other API misuse #1586
-
Scenario and errorI'm running multiple threads in my program. Two worked without any error, but one responded with InterfaceError('bad parameter or other API misuse')Traceback (most recent call last): The error pointed to:
Running Threadsexecutor = ThreadPoolExecutor(max_workers=10)
def sync_worker(req: RequestSchema):
# Here we run diferent threads to the negotiations
# the request is to chargingStation proxy endpoint
data = requests.get(f'{req.station_address}informations/')
chs_schedule_informations = data.json()
print(f"\n\n \t\t THREAD: {threading.get_native_id()} \n\n")
graph = get_graph(
chs_information=chs_schedule_informations,
car_information=req.car_information
)
thread_config = {"configurable": {"thread_id": threading.get_native_id()}}
events = graph.stream(
{
"messages": [
HumanMessage(content=prompt)
],
},
thread_config,
)
# Gathers and returns created events
result = [s for s in events]
result = []
print("EVENTS RESULTS: ", result)
return result
@router.post('/')
async def post(req: RequestSchema):
loop = asyncio.get_event_loop()
result = await loop.run_in_executor(executor, sync_worker, req)
return {"result": result} # Returns in a serialized format Systemlanggraph==0.2.1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, this has been fixed in latest release of langgraph-checkpoint-sqlite |
Beta Was this translation helpful? Give feedback.
Hi, this has been fixed in latest release of langgraph-checkpoint-sqlite