langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Langfuse tracing doesn't work with Wikipedia API component

Open rors41 opened this issue 1 year ago • 1 comments

Bug Description

When I run a flow that contains Wikipedia API component, the flow either times out or entire app straight up restarts. When Langfuse isn't connected the flow functions as expected.

Note: I've only tested a couple of components, this can also affect other components

One of the traces:

langflow-1  | TypeError: unhashable type: 'dict'
langflow-1  |
langflow-1  | During handling of the above exception, another exception occurred:
langflow-1  |
langflow-1  | Traceback (most recent call last):
langflow-1  |   File "/app/.venv/lib/python3.12/site-packages/langfuse/serializer.py", line 126, in default
langflow-1  |     result = {k: self.default(v) for k, v in vars(obj).items()}
langflow-1  |                  ^^^^^^^^^^^^^^^
langflow-1  |   File "/app/.venv/lib/python3.12/site-packages/langfuse/serializer.py", line 136, in default
langflow-1  |     print(obj.__dict__)
langflow-1  |           ^^^^^^^^^^^^
langflow-1  | AttributeError: 'dict' object has no attribute '__dict__'. Did you mean: '__dir__'?
langflow-1  | [2024-11-29 18:03:48,128][WARNING] Serialization failed for object of type ContentManager
langflow-1  | Traceback (most recent call last):
langflow-1  |   File "/app/.venv/lib/python3.12/site-packages/langfuse/serializer.py", line 104, in default
langflow-1  |     return {self.default(k): self.default(v) for k, v in obj.items()}

Reproduction

  1. Run Langflow v1.1.1 and connect it to Langfuse
  2. Run Wikipedia API component

Expected behavior

Trace uploaded to Langfuse

Who can help?

No response

Operating System

Latest Langfuse image & Langflow v1.1.1 image

Langflow Version

v1.1.1

Python Version

3.12

Screenshot

No response

Flow File

No response

rors41 avatar Nov 29 '24 18:11 rors41