Skip to content

[Bug]: has_empty_text_part_content: object of type 'NoneType' has no len() #4186

@rcleveng

Description

@rcleveng

What component(s) are affected?

  • Opik Python SDK
  • Opik Typescript SDK
  • Opik Agent Optimizer SDK
  • Opik UI
  • Opik Server
  • Documentation

Opik version

  • Opik version: v1.9.25

Describe the problem

While running my app - I got this in my terminal:

File "/Users/r/git/l/app/.venv/lib/python3.13/site-packages/opik/integrations/adk/helpers.py", line 30, in has_empty_text_part_content
    if llm_response.content is None or len(llm_response.content.parts) == 0:
                                       ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Reproduction steps and code snippets

No response

Error logs or stack trace

File "/Users/r/git/l/app/.venv/lib/python3.13/site-packages/opik/integrations/adk/helpers.py", line 30, in has_empty_text_part_content
    if llm_response.content is None or len(llm_response.content.parts) == 0:
                                       ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Healthcheck results

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions