You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when trying to get aider to convert a ~50 line Bash script to Python. My Aider is installed via pipx in a Debian PRoot running in Termux.
Aider v0.30.1
Model: gemini/gemini-1.5-pro-latest with whole edit format
Git repo: .git with 67 files
Repo-map: using 1024 tokens
Added sss to the chat.
Use /help to see in-chat commands, run with --help to see cmd line args
──────────────────────────────────────────────────────────────────────────────────
sss> This is all written in Bash. I want to change it all to Python and use the prompt toolkit package to do so. Start by writing sss2.py and basing it off of sss
sss
Traceback (most recent call last):
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 9735, in chunk_creator
if hasattr(chunk.parts[0], "finish_reason"):
~~~~~~~~~~~^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/proto/marshal/collections/repeated.py", line 125, in __getitem__
return self._marshal.to_python(self._pb_type, self.pb[key])
~~~~~~~^^^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 9740, in chunk_creator
if chunk.parts[0].finish_reason.name == "SAFETY":
~~~~~~~~~~~^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/proto/marshal/collections/repeated.py", line 125, in __getitem__
return self._marshal.to_python(self._pb_type, self.pb[key])
~~~~~~~^^^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 10218, in __next__
response: Optional[ModelResponse] = self.chunk_creator(chunk=chunk)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 10149, in chunk_creator
raise exception_type(
^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 8703, in exception_type
raise e
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 8678, in exception_type
raise APIConnectionError(
litellm.exceptions.APIConnectionError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/userr/.local/bin/aider", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/main.py", line 700, in main
coder.run()
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/coders/base_coder.py", line 397, in run
new_user_message = self.run_loop()
^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/coders/base_coder.py", line 481, in run_loop
return self.send_new_user_message(inp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/coders/base_coder.py", line 536, in send_new_user_message
interrupted = self.send(messages, functions=self.functions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/coders/base_coder.py", line 660, in send
self.show_send_output_stream(completion)
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/aider/coders/base_coder.py", line 743, in show_send_output_stream
for chunk in completion:
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 10255, in __next__
raise exception_type(
^^^^^^^^^^^^^^^
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 8703, in exception_type
raise e
File "/home/userr/.local/pipx/venvs/aider-chat/lib/python3.11/site-packages/litellm/utils.py", line 8671, in exception_type
raise APIConnectionError(
litellm.exceptions.APIConnectionError: list index out of ra
nge
The text was updated successfully, but these errors were encountered:
Are you using any sort of firewall or proxy that might be interfering with the Gemini API? As best I can tell, it looks like invalid responses are coming back from the API.
The only thing I use along those lines is Netguard- a per-app firewall/internet permission manager. It shouldn't have affected it though because the app that aider is running in (Termux) has full access. Additionally I used aider successfully with other projects with this network config.
I think this has been resolved in recent versions of litellm/aider. I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.
I get this error when trying to get aider to convert a ~50 line Bash script to Python. My Aider is installed via pipx in a Debian PRoot running in Termux.
The text was updated successfully, but these errors were encountered: