8000 [Bug]: List index out of range when using streaming mode in ADK · Issue #2013 · comet-ml/opik · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug]: List index out of range when using streaming mode in ADK #2013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 4 tasks
bugthedebugger opened this issue May 4, 2025 · 0 comments · Fixed by #2027
< D401 span title="Status: Closed" data-view-component="true" class="State State--merged d-flex flex-items-center"> Closed
1 of 4 tasks

[Bug]: List index out of range when using streaming mode in ADK #2013

bugthedebugger opened this issue May 4, 2025 · 0 comments · Fixed by #2027

Comments

@bugthedebugger
Copy link
bugthedebugger commented May 4, 2025

What component(s) are affected?

  • Python SDK
  • Opik UI
  • Opik Server
  • Documentation

Opik version

  • Opik version: "^1.7.14"

Describe the problem

I get this error when I'm using the ADK Agent with runner in streaming mode. Even though the logs make its way to OPIK, our cloudwatch is blowing up with this error log 😆

Reproduction steps and code snippets

      events_async = runner.run_async(
            session_id=session.id, 
            user_id=session.user_id, 
            new_message=content,
            run_config=RunConfig(
                streaming_mode=StreamingMode.SSE,
            )
      )

     agent = LlmAgent(
		model=selected_model,
		name=agent_name,
		instruction=system_prompt,
		tools=tools,
                 before_agent_callback=opik_tracer.before_agent_callback,
		after_agent_callback=opik_tracer.after_agent_callback,
		before_model_callback=opik_tracer.before_model_callback,
		after_model_callback=opik_tracer.after_model_callback,
		before_tool_callback=opik_tracer.before_tool_callback,
		after_tool_callback=opik_tracer.after_tool_callback
	)

Error logs or stack trace

Traceback (most recent call last):
  File "/Users/username/Documents/Projects/projectname/projectname-ai-agents/.venv/lib/python3.13/site-packages/opik/decorator/base_track_decorator.py", line 427, in _after_call
    span_data_to_end, trace_data_to_end = pop_end_candidates()
                                          ~~~~~~~~~~~~~~~~~~^^
  File "/Users/username/Documents/Projects/projectname/projectname-ai-agents/.venv/lib/python3.13/site-packages/opik/decorator/base_track_decorator.py", line 529, in pop_end_candidates
    span_data_to_end = context_storage.pop_span_data()
  File "/Users/username/Documents/Projects/projectname/projectname-ai-agents/.venv/lib/python3.13/site-packages/opik/context_storage.py", line 50, in pop_span_data
    return stack[-1]
           ~~~~~^^^^
IndexError: list index out of range

Healthcheck results

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0