All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
31.69k stars 3.66k forks source link

FileWriteAction.__init__() missing 1 required positional argument: 'content' #933

Closed stratte89 closed 5 months ago

stratte89 commented 5 months ago

I use Ubuntu, oobabooga webui, cognitivecomputations_dolphin-2.8-mistral-7b-v02, and the latest version (Revert the use of Router, good ole completion works.)

LLM_API_KEY="na" LLM_BASE_URL="http://0.0.0.0:5000/v1" LLM_MODEL="openai/Mistral" LLM_EMBEDDING_MODEL="lokal" WORKSPACE_DIR="./workspace" MAX_ITERATIONS=20000

Logs, error messages, and screenshots: STEP 5

PLAN: tetris game in python pygame

ERROR: FileWriteAction.init() missing 1 required positional argument: 'content' Traceback (most recent call last): File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 135, in step action = self.agent.step(self.state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/agent.py", line 217, in step action = prompts.parse_action_response(action_resp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/prompts.py", line 158, in parse_action_response return action_from_dict(action_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/action/init.py", line 40, in action_from_dict return action_class(args) ^^^^^^^^^^^^^^^^^^^^ TypeError: FileWriteAction.init() missing 1 required positional argument: 'content' 07:02:31 - opendevin:ERROR: agent_controller.py:113 - Error in loop Traceback (most recent call last): File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 111, in start_loop finished = await self.step(i) ^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 135, in step action = self.agent.step(self.state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/agent.py", line 217, in step action = prompts.parse_action_response(action_resp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/prompts.py", line 158, in parse_action_response return action_from_dict(action_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/action/init.py", line 40, in action_from_dict return action_class(args) ^^^^^^^^^^^^^^^^^^^^ TypeError: FileWriteAction.init() missing 1 required positional argument: 'content' image

stratte89 commented 5 months ago

Please follow the issue template. 🙏

run git log --format="%h | %cr" -n 1 or the below code and paste the clipboard content here.

import subprocess

def run(command):
    return subprocess.run(command, shell=True, capture_output=True).stdout.decode('utf-8')

try: 
    from pyperclip import copy
except ImportError:
    subprocess.run('pip install pyperclip --user', shell=True)
    from pyperclip import copy

commands = {
    'version' : 'git log --format="%h | %cr" -n 1'
}

for command in commands:
    commands[command] = run(commands[command])

output = ''
for command in commands:
    output += f'{command}: {commands[command]}\n'

output = output.strip()
copy(output)

(base) stratte@stratte-MS-7D08:~/Schreibtisch/AI/OpenDevin$ git log --format="%h | %cr" -n 1 8ab9c6f | vor 3 Stunden

SmartManoj commented 5 months ago

Add print(action) after line 39 in "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/action/init.py",.

stratte89 commented 5 months ago

Add print(action) after line 39 in "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/action/init.py",.

STEP 20

PLAN: tetris in python pygame

{'action': 'think', 'args': {'thought': 'Next, I should work on writing a simple Tetris game in Python with Pygame to implement the logic of Tetris.'}, 'message': 'Next, I should work on writing a simple Tetris game in Python with Pygame to implement the logic of Tetris.'} {'thought': 'Next, I should work on writing a simple Tetris game in Python with Pygame to implement the logic of Tetris.'}

ACTION: AgentThinkAction(thought='Next, I should work on writing a simple Tetris game in Python with Pygame to implement the logic of Tetris.', action=<ActionType.THINK: 'think'>)

============== STEP 21

PLAN: tetris in python pygame

ERROR: Invalid response: no JSON found Traceback (most recent call last): File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 135, in step action = self.agent.step(self.state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/agent.py", line 217, in step action = prompts.parse_action_response(action_resp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/prompts.py", line 154, in parse_action_response action_dict = json.loads(response) ^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/json.py", line 31, in loads raise ValueError("Invalid response: no JSON found") ValueError: Invalid response: no JSON found 07:51:28 - opendevin:ERROR: agent_controller.py:113 - Error in loop Traceback (most recent call last): File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 111, in start_loop finished = await self.step(i) ^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/opendevin/controller/agent_controller.py", line 135, in step action = self.agent.step(self.state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/agent.py", line 217, in step action = prompts.parse_action_response(action_resp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/prompts.py", line 154, in parse_action_response action_dict = json.loads(response) ^^^^^^^^^^^^^^^^^^^^ File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/json.py", line 31, in loads raise ValueError("Invalid response: no JSON found") ValueError: Invalid response: no JSON found

Opendevin Frontend chat: Error during task loop.

stratte89 commented 5 months ago

after line 39

not before; add at line 40

i did, i realised the mistake and the error above happended after i corrected it and wrote it in line 40

image

SmartManoj commented 5 months ago

File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/json.py", line 31, in loads raise ValueError("Invalid response: no JSON found") Change to raise ValueError(f"Invalid response: no JSON found; Got {s}")

These errors are due to the low quality of the LLM.

stratte89 commented 5 months ago

File "/home/stratte/Schreibtisch/AI/OpenDevin/agenthub/monologue_agent/utils/json.py", line 31, in loads raise ValueError("Invalid response: no JSON found") Change to raise ValueError(f"Invalid response: no JSON found; Got {s}")

These errors are due to the low quality of the LLM.

ah ok, just weird that i haven't had that error with earlier versions and the same LLM. Can you recommend a local LLM for i5 11400, 3080, 32gb ram, oobabooga webui?