Skip to content

[BUG] You passed these duplicate names: ['inspect_file_as_text', 'inspect_file_as_text'] when running Open Deep Research example #801

@jochenvw

Description

@jochenvw

Describe the bug
Trying to run open deep research example - however, when I do, I get the error message ValueError: Each tool or managed_agent should have a unique name! You passed these duplicate names: ['inspect_file_as_text', 'inspect_file_as_text']

Code to reproduce the error

Error logs (if any)

python run.py --model-id "o1" "How many seconds would it take for a leopard at full speed to run through Pont des Arts?"
C:\Users\me\AppData\Roaming\Python\Python313\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Chat templates should be in a 'chat_template.jinja' file but found key='chat_template' in the processor's config. Make sure to move your template to its own file.

    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|

Enter your token (input will not be visible):
Add token as git credential? (Y/n) n
Traceback (most recent call last):
  File "C:\_CODE\smolagents\examples\open_deep_research\run.py", line 146, in <module>
    main()
    ~~~~^^
  File "C:\_CODE\smolagents\examples\open_deep_research\run.py", line 130, in main
    manager_agent = CodeAgent(
        model=model,
    ...<5 lines>...
        managed_agents=[text_webbrowser_agent],
    )
  File "C:\_CODE\smolagents\src\smolagents\agents.py", line 1161, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        tools=tools,
        ^^^^^^^^^^^^
    ...<4 lines>...
        **kwargs,
        ^^^^^^^^^
    )
    ^
  File "C:\_CODE\smolagents\src\smolagents\agents.py", line 225, in __init__
    self._validate_tools_and_managed_agents(tools, managed_agents)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\_CODE\smolagents\src\smolagents\agents.py", line 266, in _validate_tools_and_managed_agents
    raise ValueError(
    ...<2 lines>...
    )
ValueError: Each tool or managed_agent should have a unique name! You passed these duplicate names: ['inspect_file_as_text', 'inspect_file_as_text']

Expected behavior
The agents to come up with a nice answer :)

Packages version:
Fresh clone and pip install today (feb 26th)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions