Skip to content

feature: better handling off io issues #295

@ErichBSchulz

Description

@ErichBSchulz

Issue

so.... this is completely on me for unplugging my pi while I was in cecli on a mounted drive... but I'm wondering if we can tidy this up (low priority):

Unhandled exception in event loop:
File "/home/erich/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/input/vt100.py", line 162, in callback_wrapper
callback()
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/application/application.py", line 714, in read_from_input_in_context
context.copy().run(read_from_input)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/application/application.py", line 694, in read_from_input
self.key_processor.process_keys()
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 273, in process_keys
self._process_coroutine.send(key_press)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 188, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 323, in _call_handler
handler.call(event)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 127, in call
result = self.handler(event)
^^^^^^^^^^^^^^^^^^^
File "/home/erich/aider-ce/aider/io.py", line 873, in _
@kb.add("enter", eager=True, filter=~is_searching)

File "/home/erich/aider-ce/aider/main.py", line 577, in custom_tracer
log_file.write(

Exception [Errno 5] Input/output error

Unhandled exception in event loop:
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1923, in new_coroutine
await coroutine(*a, **kw)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1740, in async_completer
async for completion in async_generator:
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/completion/base.py", line 310, in get_completions_async
async for completion in completer.get_completions_async(
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/completion/base.py", line 268, in get_completions_async
async for completion in async_generator:
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/eventloop/async_generator.py", line 125, in generator_to_async_generator
await runner_f
File "/home/erich/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/eventloop/async_generator.py", line 78, in runner
for item in get_iterable():
File "/home/erich/aider-ce/aider/io.py", line 251, in get_completions
self.tokenize()
File "/home/erich/aider-ce/aider/io.py", line 198, in tokenize
with open(fname, "r", encoding=self.encoding) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exception [Errno 5] Input/output error: '/home/erich/pi004/home/erich/ha/--command_prefix=pil 4'
Press ENTER to continue...
Press ENTER to continue...
Readonly: ../../../../bin/convention.md
Editable: --command_prefix=pil 4
multi> /report
multi>

Unhandled exception in event loop:
File "/home/erich/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/application/application.py", line 714, in read_from_input_in_context
context.copy().run(read_from_input)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/application/application.py", line 694, in read_from_input
self.key_processor.process_keys()
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 273, in process_keys
self._process_coroutine.send(key_press)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 188, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_processor.py", line 323, in _call_handler
handler.call(event)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 127, in call
result = self.handler(event)
^^^^^^^^^^^^^^^^^^^
File "/home/erich/aider-ce/aider/io.py", line 892, in _
event.current_buffer.validate_and_handle()
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1891, in validate_and_handle
self.append_to_history()
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1365, in append_to_history
self.history.append_string(self.text)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/history.py", line 76, in append_string
self.store_string(string)
File "/home/erich/.local/share/uv/tools/aider-ce/lib/python3.11/site-packages/prompt_toolkit/history.py", line 299, in store_string
with open(self.filename, "ab") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^

Exception [Errno 5] Input/output error: '/home/erich/pi004/home/erich/ha/.aider.input.history'
Press ENTER to continue...
Processing...
Attempting to open the issue URL in your default web browser...
Browser window should be opened.
Finished.

Version and model info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions