aider icon indicating copy to clipboard operation
aider copied to clipboard

Uncaught OSError in utils.py line 196

Open paulobunga opened this issue 1 year ago • 1 comments

Aider version: 0.56.0 Python version: 3.12.5 Platform: Windows-11-10.0.22621-SP0 Python implementation: CPython Virtual environment: No OS: Windows 11 (64bit) Git information unavailable

An uncaught exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 698, in main
    coder.run()
  File "base_coder.py", line 735, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 778, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1102, in send_message
    chunks = self.format_messages()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1040, in format_messages
    chunks = self.format_chat_chunks()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 990, in format_chat_chunks
    chunks.repo = self.get_repo_messages()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 632, in get_repo_messages
    repo_content = self.get_repo_map()
                   ^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 604, in get_repo_map
    repo_content = self.repo_map.get_repo_map(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 127, in get_repo_map
    files_listing = self.get_ranked_tags_map(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 478, in get_ranked_tags_map
    result = self.get_ranked_tags_map_uncached(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 509, in get_ranked_tags_map_uncached
    ranked_tags = self.get_ranked_tags(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "repomap.py", line 309, in get_ranked_tags
    fnames = tqdm(fnames, desc="Scanning repo")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "std.py", line 1098, in __init__
    self.refresh(lock_args=self.lock_args)
  File "std.py", line 1347, in refresh
    self.display()
  File "std.py", line 1495, in display
    self.sp(self.__str__() if msg is None else msg)
  File "std.py", line 459, in print_status
    fp_write('\r' + s + (' ' * max(last_len[0] - len_s, 0)))
  File "std.py", line 452, in fp_write
    fp.write(str(s))
  File "utils.py", line 196, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 6] The handle is invalid

paulobunga avatar Sep 29 '24 20:09 paulobunga

Thank you for filing this issue.

It seems there was a problem accessing a file while trying to build the repository map.

Do you have a huge repository? Does this happen repeatedly?

fry69 avatar Sep 29 '24 20:09 fry69

I'm closing this issue for now.

If any new related concerns arise, please feel free to comment, and I'll reopen the issue.

fry69 avatar Oct 05 '24 12:10 fry69