Skip to content
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

[Bug]: openhands:ERROR: loop.py:22 - RuntimeError: Error type: KeyError (KeyError: 'command' in fn calling) #6255

Open
1 task done
scosenza opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working severity:medium Affecting multiple users

Comments

@scosenza
Copy link

scosenza commented Jan 13, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

poetry run python -m openhands.core.cli
...
...
Review the changes and make sure they are as expected. Edit the file again if necessary.
23:46:29 - openhands:ERROR: agent_controller.py:212 - [Agent Controller default] Error while running the agent (session ID: default): 'command'. Traceback: Traceback (most recent call last):
  File "/tmp/OpenHands/openhands/controller/agent_controller.py", line 210, in _step_with_exception_handling
    await self._step()
  File "/tmp/OpenHands/openhands/controller/agent_controller.py", line 555, in _step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/OpenHands/openhands/agenthub/codeact_agent/codeact_agent.py", line 390, in step
    actions = codeact_function_calling.response_to_actions(response)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/OpenHands/openhands/agenthub/codeact_agent/function_calling.py", line 511, in response_to_actions
    if arguments['command'] == 'view':
       ~~~~~~~~~^^^^^^^^^^^
KeyError: 'command'

23:46:29 - openhands:ERROR: loop.py:22 - RuntimeError: There was an unexpected error while running the agent. Please report this error to the developers. Your session ID is default. Error type: KeyError

OpenHands Installation

Docker command in README

OpenHands Version

Built from source while testing #5284
SHA: baf0adb
Branch: add-local-runtime

Operating System

Linux

Logs, Errors, Screenshots, and Additional Context

No response

@sudo-vaibhav
Copy link

I am also facing similar error

@mamoodi mamoodi added the severity:medium Affecting multiple users label Jan 14, 2025
@xingyaoww
Copy link
Collaborator

Could y'all share what model you are using?

@enyst enyst changed the title [Bug]: openhands:ERROR: loop.py:22 - RuntimeError: There was an unexpected error while running the agent. Please report this error to the developers. Your session ID is default. Error type: KeyError [Bug]: openhands:ERROR: loop.py:22 - RuntimeError: Error type: KeyError (KeyError: 'command' in fn calling) Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working severity:medium Affecting multiple users
Projects
None yet
Development

No branches or pull requests

4 participants