Uncaught OSError in _win32_console.py line 403/faarax
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- cli, operating-systems
Research direction
Start at _win32_console.py line 403 and trace the call from _windows_renderer.py through io.py when the provider error is displayed. Reproduce the Windows 10 failure using the error path in base_coder.py, then verify that the original 404 error is reported without an uncaught OSError from console output.
Written by the indexing model from the issue text.
Description
Aider version: 0.86.2
Python version: 3.12.10
Platform: Windows-10-10.0.19045-SP0
Python implementation: CPython
Virtual environment: Yes
OS: Windows 10 (64bit)
Git version: git version 2.55.0.windows.3
An uncaught exception occurred:
Traceback (most recent call last):
File "llm_http_handler.py", line 221, in _make_common_sync_call
response = sync_httpx_client.post(
^^^^^^^^^^^^^^^^^^^^^^^
File "http_handler.py", line 1028, in post
raise e
File "http_handler.py", line 1010, in post
response.raise_for_status()
File "_models.py", line 829, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://openrouter.ai/api/v1/chat/completions'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 3212, in completion
response = base_llm_http_handler.completion(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "llm_http_handler.py", line 508, in completion
completion_stream, headers = self.make_sync_call(
^^^^^^^^^^^^^^^^^^^^
File "llm_http_handler.py", line 598, in make_sync_call
response = self._make_common_sync_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "llm_http_handler.py", line 246, in _make_common_sync_call
raise self._handle_error(e=e, provider_config=provider_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "llm_http_handler.py", line 4623, in _handle_error
raise provider_config.get_error_class(
litellm.llms.openrouter.common_utils.OpenRouterException: {"error":{"message":"No endpoints found for anthropic/claude-3-opus.","code":404},"user_id":"user_3IdW2BKtcxpDkU7mjfcGPTEVAto"}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "base_coder.py", line 1459, in send_message
yield from self.send(messages, functions=self.functions)
File "base_coder.py", line 1797, in send
hash_object, completion = model.send_completion(
^^^^^^^^^^^^^^^^^^^^^^
File "models.py", line 1021, in send_completion
res = litellm.completion(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "utils.py", line 1748, in wrapper
raise e
File "utils.py", line 1569, in wrapper
result = original_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "main.py", line 4305, in completion
raise exception_type(
^^^^^^^^^^^^^^^
File "exception_mapping_utils.py", line 2378, in exception_type
raise e
File "exception_mapping_utils.py", line 2258, in exception_type
raise NotFoundError(
litellm.exceptions.NotFoundError: litellm.NotFoundError: NotFoundError: OpenrouterException - {"error":{"message":"No endpoints found for anthropic/claude-3-opus.","code":404},"user_id":"user_3IdW2BKtcxpDkU7mjfcGPTEVAto"}
During handling of the above exception, another 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 5, in <module>
sys.exit(main())
^^^^^^
File "main.py", line 1162, in main
coder.run()
File "base_coder.py", line 887, in run
self.run_one(user_message, preproc)
File "base_coder.py", line 934, in run_one
list(self.send_message(message))
File "base_coder.py", line 1476, in send_message
self.check_and_open_urls(err, ex_info.description)
File "base_coder.py", line 954, in check_and_open_urls
self.io.tool_error(text)
File "io.py", line 990, in tool_error
self._tool_message(message, strip, self.tool_error_color)
File "io.py", line 980, in _tool_message
self.console.print(message, **style)
File "console.py", line 1697, in print
with self:
^^^^
File "console.py", line 870, in __exit__
self._exit_buffer()
File "console.py", line 826, in _exit_buffer
self._check_buffer()
File "console.py", line 2042, in _check_buffer
self._write_buffer()
File "console.py", line 2078, in _write_buffer
legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
File "_windows_renderer.py", line 19, in legacy_windows_render
term.write_text(text)
File "_win32_console.py", line 403, in write_text
self.flush()
OSError: [Errno 22] Invalid argument
- Dominant language
- Python
- Stars
- 49.4k
- Forks
- 5k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Aider-AI/aider
-
BUG: a failed file write is reported to the model as "I updated the files." and counted as an editPossibly taken @shuaiyafei claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
BUG: `/code` without arguments summarizes and replaces the chat history, unlike `/chat-mode code`Possibly taken @Sarthak816 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
BUG: callable `test_cmd` crashes `Coder.get_platform_info` with `TypeError` on the first messagePossibly taken @yushiwuzhengjianyuzi claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
BUG: `/undo` never sends `undo_command_reply` to the model because `cmd_undo` discards `raw_cmd_undo`'s return valuePossibly taken @yushiwuzhengjianyuzi claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
BUG: invalid `--assistant-output-color` is reset to `None`, then every pretty reply crashes in Rich and its edits are not appliedPossibly taken @emme1t claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Project submission:Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#845 ·
Maintainers usually reply within 1 day
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPossibly taken A pull request linked to this issue is open or already merged. Opendifficulty:2 enhancement good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
MakazhanAlpamys/Soup#2178 ·
Maintainers usually reply within 1 day
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
scverse/rapids-singlecell#854 ·
Maintainers usually reply within 1 day
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPossibly taken @ninglinLiu claimed this 1 day ago. Openarea:frontend backend:slang bug direction:input
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalsePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 13 days