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

fix: Handle invalid exit code conversion #1915

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

SmartManoj
Copy link
Collaborator

Solves

18:17:31 - ACTION
**CmdRunAction**
COMMAND:
echo "#!/bin/bash
edit 1:1 <<EOF
Updated Storybook
EOF" > tmp_script.sh; bash ./tmp_script.sh
Traceback (most recent call last):
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/controller/agent_controller.py", line 105, in _start_step_loop
    await self._step()
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/controller/agent_controller.py", line 231, in _step 
    await self.event_stream.add_event(action, EventSource.AGENT)
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/events/stream.py", line 87, in add_event
    await fn(event)
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/runtime.py", line 88, in on_event
    observation = await self.run_action(event)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/runtime.py", line 108, in run_action        
    observation = await getattr(self, action_type)(action)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/server/runtime.py", line 26, in run
    return self._run_command(action.command, background=action.background)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/server/runtime.py", line 96, in _run_command
    return self._run_immediately(command)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/server/runtime.py", line 100, in _run_immediately
    exit_code, output = self.sandbox.execute(command)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/smart/Desktop/GD/OpenDevin/opendevin/runtime/docker/ssh_box.py", line 477, in execute    
    exit_code = int(
                ^^^^
ValueError: invalid literal for int() with base 10: '> > > > > >'

@rbren
Copy link
Collaborator

rbren commented May 20, 2024

Very strange response string...

@rbren rbren merged commit 4612e10 into OpenDevin:main May 20, 2024
24 checks passed
@rbren
Copy link
Collaborator

rbren commented May 20, 2024

CC @xingyaoww for visibility. Looks like the output you'd get from a multi-line command. Not sure what could have gone wrong here

li-boxuan pushed a commit to li-boxuan/OpenDevin that referenced this pull request May 21, 2024
@xingyaoww
Copy link
Collaborator

Yeah, I've seen weird thing like this occasionally. Good motivation for us to improve the edit command and get rid of HEREDOC

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 this pull request may close these issues.

None yet

3 participants