Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught OSError in utils.py line 196 #1829

Open
paulobunga opened this issue Sep 29, 2024 · 1 comment
Open

Uncaught OSError in utils.py line 196 #1829

paulobunga opened this issue Sep 29, 2024 · 1 comment
Labels
question Further information is requested

Comments

@paulobunga
Copy link

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

@fry69
Copy link
Collaborator

fry69 commented Sep 29, 2024

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 fry69 added the question Further information is requested label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants