Find answers from the community

Home
Members
1024bees
1
1024bees
Offline, last seen 3 months ago
Joined October 9, 2024
hey folks, i'm seeing an issue with phoenix and llama-index integration using llama index's Workflow s-- the exact error message is:

Plain Text
 python
... earlier workflow logic
Step initialize_reasoning produced event InputEvent
Running step handle_llm_input
Step handle_llm_input produced event StopEvent
Failed to detach context
Traceback (most recent call last):
  File "/Users/james/Library/Caches/pypoetry/virtualenvs/viv-UNwrkwNB-py3.12/lib/python3.12/site-packages/opentelemetry/context/__init__.py", line 154, in detach
    _RUNTIME_CONTEXT.detach(token)
  File "/Users/james/Library/Caches/pypoetry/virtualenvs/viv-UNwrkwNB-py3.12/lib/python3.12/site-packages/opentelemetry/context/contextvars_context.py", line 50, in detach
    self._current_context.reset(token)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: <Token var=<ContextVar name='current_context' default={} at 0x168757fb0> at 0x16b6ead80> was created in a different Context

FWIW, the backtrace not shown here fails when trying to exit a span that was created on an async function, using the async

if i remove the dispatcher.span on Workflow.run, then this error disappears, so it seems to be related with exiting the Workflow.run span.

fwiw, executing my workflow with the following line: res = await agent.run()
5 comments
1
L