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

Fix error in aider agent #51

Open
bscriver123 opened this issue Feb 19, 2025 · 0 comments · May be fixed by #52
Open

Fix error in aider agent #51

bscriver123 opened this issue Feb 19, 2025 · 0 comments · May be fixed by #52

Comments

@bscriver123
Copy link
Contributor

When I run a docker container with this entrypoint and the Docker image generated with this Dockerfile

FROM paulgauthier/aider

USER root
SHELL ["/bin/bash", "-c"]
RUN apt-get update &&
apt-get install -y ripgrep &&
. /venv/bin/activate &&
pip install ra-aid


entrypoint = [
    "/bin/bash",
    "-c",
    (
        "source /venv/bin/activate && "
        f'ra-aid -m "{escaped_solver_command}" --provider openai-compatible --model {model_name.value} --expert-provider {expert_provider} --expert-model {expert_model} --cowboy-mode'  # noqa: E501
    ).strip(),
]

I get the following error. Can you provide a way to fix it?

31207b4d645a aider-raaid "/bin/bash -c 'sourc…" 1 second ago Up Less than a second vigorous_taussig
ubuntu@ip-10-0-0-96:~/minimal-provider-ra-aid$ docker logs 31207b4d645a
Traceback (most recent call last):
File "/venv/bin/ra-aid", line 5, in
from ra_aid.main import main
File "/venv/lib/python3.10/site-packages/ra_aid/init.py", line 2, in
from .agent_utils import run_agent_with_retry
File "/venv/lib/python3.10/site-packages/ra_aid/agent_utils.py", line 25, in
from ra_aid.agents.ciayn_agent import CiaynAgent
File "/venv/lib/python3.10/site-packages/ra_aid/agents/ciayn_agent.py", line 10, in
from ra_aid.tools.reflection import get_function_info
File "/venv/lib/python3.10/site-packages/ra_aid/tools/init.py", line 29, in
from .write_file import put_complete_file_contents
File "/venv/lib/python3.10/site-packages/ra_aid/tools/write_file.py", line 68
('initialized empty file' if not complete_file_contents else f'wrote {result['bytes_written']} bytes')
^^^^^^^^^^^^^
SyntaxError: f-string: f-string: unmatched '['

minimalProviderAgentMarket added a commit to minimalProviderAgentMarket/minimal-provider-agent-market that referenced this issue Feb 19, 2025
Fix syntax error in ra-aid's write_file.py where nested single quotes in 
an f-string were causing a SyntaxError. Replace single quotes with double 
quotes around the f-string to properly handle dictionary key access. This 
addresses the issue reported in GroupLang#51 where the code would fail during file 
writing operations due to improper string formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant