OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: [Multi-conversation] Errors in console for non-existent metadata

Open enyst opened this issue 10 months ago • 3 comments

Is there an existing issue for the same bug?

  • [x] I have checked the existing issues.

Describe the bug and reproduction steps

Locally, click on the Conversations icon, I get a large number of errors, for all conversations that don't have metadata.json.

Snippet:

22:56:30 - openhands:ERROR: file_conversation_store.py:88 - Error loading conversation: or-gpt-4o-mini-efeb15780f39c816
Traceback (most recent call last):
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 86, in search
    conversations.append(await self.get_metadata(conversation_id))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 39, in get_metadata
    json_str = await call_sync_from_async(self.file_store.read, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/Users/enyst/.pyenv/versions/3.12.6/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/local.py", line 29, in read
    with open(full_path, 'r') as f:
         ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/enyst/repos/odie/cache/sessions/or-gpt-4o-mini-efeb15780f39c816/metadata.json'
22:56:30 - openhands:ERROR: file_conversation_store.py:88 - Error loading conversation: delegator-14ed4190b57e6773
Traceback (most recent call last):
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 86, in search
    conversations.append(await self.get_metadata(conversation_id))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 39, in get_metadata
    json_str = await call_sync_from_async(self.file_store.read, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/Users/enyst/.pyenv/versions/3.12.6/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/local.py", line 29, in read
    with open(full_path, 'r') as f:
         ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/enyst/repos/odie/cache/sessions/delegator-14ed4190b57e6773/metadata.json'
22:56:30 - openhands:ERROR: file_conversation_store.py:88 - Error loading conversation: claude-ah-123-0282e3ef53ffb15c
Traceback (most recent call last):
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 86, in search
    conversations.append(await self.get_metadata(conversation_id))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/conversation/file_conversation_store.py", line 39, in get_metadata
    json_str = await call_sync_from_async(self.file_store.read, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/Users/enyst/.pyenv/versions/3.12.6/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/Users/enyst/repos/odie/openhands/storage/local.py", line 29, in read
    with open(full_path, 'r') as f:
         ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/enyst/repos/odie/cache/sessions/claude-ah-123-0282e3ef53ffb15c/metadata.json'

OpenHands Installation

Development workflow

OpenHands Version

main

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

enyst avatar Feb 18 '25 22:02 enyst

cc @tofarr and @amanape

mamoodi avatar Feb 19 '25 15:02 mamoodi

@enyst FYI Nit is an internal label for syncing a shortlist of issue to our Linear :) I think it actually fits this one though

rbren avatar Mar 07 '25 22:03 rbren

We can remove it if you'd like, FWIW I kinda got quite a bit annoyed with this so I'm not too sure about its nit-ness 😅

enyst avatar Mar 07 '25 23:03 enyst

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Apr 07 '25 02:04 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Apr 14 '25 02:04 github-actions[bot]