SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix: Try to get exception message from exception args
Kilian Lierete50515c59d4b
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex ffebe4cd..faccff0f 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -666,6 +666,11 @@ class Agent:step = getattr(exception, "step", StepOutput())self.add_step_to_trajectory(step)exception_message = getattr(exception, "message", "")+ if not exception_message:+ try:+ exception_message = exception.args[0]+ except (IndexError, AttributeError):+ passreturn self.get_model_requery_history(error_template=template,**step.model_dump(),