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
File /opt/conda/envs/Python-RT23.1/lib/python3.10/site-packages/langgraph/pregel/executor.py:92, in BackgroundExecutor.exit(self, exc_type, exc_value, traceback)
90 for task in self.tasks:
91 try:
---> 92 task.result()
93 except concurrent.futures.CancelledError:
94 pass
File /opt/conda/envs/Python-RT23.1/lib/python3.10/concurrent/futures/_base.py:451, in Future.result(self, timeout)
449 raise CancelledError()
450 elif self._state == FINISHED:
--> 451 return self.__get_result()
453 self._condition.wait(timeout)
455 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
File /opt/conda/envs/Python-RT23.1/lib/python3.10/concurrent/futures/_base.py:403, in Future.__get_result(self)
401 if self._exception:
402 try:
--> 403 raise self._exception
404 finally:
405 # Break a reference cycle with the exception in self._exception
406 self = None
File /opt/conda/envs/Python-RT23.1/lib/python3.10/site-packages/langgraph/pregel/executor.py:59, in BackgroundExecutor.done(self, task)
57 def done(self, task: concurrent.futures.Future) -> None:
58 try:
---> 59 task.result()
60 except GraphInterrupt:
61 # This exception is an interruption signal, not an error
62 # so we don't want to re-raise it on exit
63 self.tasks.pop(task)
File /opt/conda/envs/Python-RT23.1/lib/python3.10/concurrent/futures/_base.py:451, in Future.result(self, timeout)
449 raise CancelledError()
450 elif self._state == FINISHED:
--> 451 return self.__get_result()
453 self._condition.wait(timeout)
455 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
File /opt/conda/envs/Python-RT23.1/lib/python3.10/concurrent/futures/_base.py:403, in Future.__get_result(self)
401 if self._exception:
402 try:
--> 403 raise self._exception
404 finally:
405 # Break a reference cycle with the exception in self._exception
406 self = None
File /opt/conda/envs/Python-RT23.1/lib/python3.10/concurrent/futures/thread.py:58, in _WorkItem.run(self)
55 return
57 try:
---> 58 result = self.fn(*self.args, **self.kwargs)
59 except BaseException as exc:
60 self.future.set_exception(exc)
File /opt/conda/envs/Python-RT23.1/lib/python3.10/site-packages/langgraph/checkpoint/memory/init.py:363, in MemorySaver.put_writes(self, config, writes, task_id)
361 for idx, (c, v) in enumerate(writes):
362 inner_key = (task_id, WRITES_IDX_MAP.get(c, idx))
--> 363 self.writes[outer_key][inner_key] = (task_id, c, self.serde.dumps_typed(v))
File /opt/conda/envs/Python-RT23.1/lib/python3.10/json/encoder.py:199, in JSONEncoder.encode(self, o)
195 return encode_basestring(o)
196 # This doesn't pass the iterator directly to ''.join() because the
197 # exceptions aren't as detailed. The list call should be roughly
198 # equivalent to the PySequence_Fast that ''.join() would do.
--> 199 chunks = self.iterencode(o, _one_shot=True)
200 if not isinstance(chunks, (list, tuple)):
201 chunks = list(chunks)
File /opt/conda/envs/Python-RT23.1/lib/python3.10/site-packages/langgraph/checkpoint/serde/jsonplus.py:121, in JsonPlusSerializer._default(self, obj)
119 return repr(obj)
120 else:
--> 121 raise TypeError(
122 f"Object of type {obj.class.name} is not JSON serializable"
123 )
TypeError: Object of type float32 is not JSON serializable
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
-
System Information
Package Information
Optional packages not installed
Other Dependencies
Currently working on a project based on https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag_local/. For my use case I would like to implement memory. However, I am getting the following error when implementing MemorySaver() to my workflow.
This is the code that I am trying to implement:
Beta Was this translation helpful? Give feedback.
All reactions