Repository: All-Hands-AI/OpenHands

Issue #420: Getting stuck with observation 'Error condensing thoughts: Expecting value: line 1 column 1 (char 0)
Created: 2024-03-31T00:38:45Z
I have tried this with both claude-3-opus-20240229s and gpt-4--0125-preview:
changeset from 3/30/2024:
git log -1 --pretty=format:"%H"
87d56d9
Steps to Reproduce

Requested creation of a python package with four named modules, using pytest and pytest-bdd with an initial placeholder and the package dependency manager of od's choice
It makes it as far as installing poetry and then receive the issue.
I would stop backend and front end and restart with a prompt to 'resume where we left off' - it would detect and continue then fail again on the same, post poetry install.
I would thenk stop backend and front end swap from Claude to GPT4 with same prompt --- same outcome

Additional context

Duplicate issue #421: Error condensing thoughts: Expecting value: line 1 column 1 (char 0)
Created: 2024-03-31T00:44:22Z
Latest version, just pulled. This happened after a terminal command by OpenDevin.
AGENT ERROR:
        Error condensing thoughts: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/home/erik/OpenDevin/agenthub/langchains_agent/utils/monologue.py", line 32, in condense
    self.thoughts = prompts.parse_summary_response(summary_resp)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/OpenDevin/agenthub/langchains_agent/utils/prompts.py", line 143, in parse_summary_response
    parsed = json.loads(response)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/OpenDevin/agenthub/langchains_agent/utils/json.py", line 11, in loads
    return json.loads(s, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/.pyenv/versions/3.11.8/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/.pyenv/versions/3.11.8/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/.pyenv/versions/3.11.8/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erik/OpenDevin/opendevin/controller/agent_controller.py", line 89, in step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/erik/OpenDevin/agenthub/langchains_agent/langchains_agent.py", line 125, in step
    self._add_event(obs.to_dict())
  File "/home/erik/OpenDevin/agenthub/langchains_agent/langchains_agent.py", line 74, in _add_event
    self.monologue.condense(self.llm)
  File "/home/erik/OpenDevin/agenthub/langchains_agent/utils/monologue.py", line 35, in condense
    raise RuntimeError(f"Error condensing thoughts: {e}")
RuntimeError: Error condensing thoughts: Expecting value: line 1 column 1 (char 0)
Client websocket disconnected (<CloseCode.ABNORMAL_CLOSURE: 1006>, None)

Closing comment (2024-03-31T00:48:07Z): Also reported in #420