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

PR Agent failed to run in github action: ValueError: No closing quotation #1435

Open
cfc4n opened this issue Jan 2, 2025 · 8 comments
Open
Labels

Comments

@cfc4n
Copy link

cfc4n commented Jan 2, 2025

Hello everyone, in my project, the operation failed, but it was fine two days ago, here I didn't make any changes during this time. What went wrong? Is it because I used Codium-ai/pr-agent@main? Should v0.26 be used instead of main?

Is the root cause of the problem "Applying repo settings\n"? Shouldn't it contain the character \n?

Thanks .

Run Codium-ai/pr-agent@main
  env:
    OPENAI_KEY: ***
    GITHUB_TOKEN: ***
    github_action_config.auto_review: true
    github_action_config.auto_describe: true
    github_action_config.auto_improve: true
    github_action_config.pr_actions: ["opened", "reopened", "ready_for_review", "review_requested"]
{"text": "Applying repo settings\n", "record": {"elapsed": {"repr": "0:00:01.711570", "seconds": 1.71157}, "exception": null, "extra": {}, "file": {"name": "github_action_runner.py", "path": "/app/pr_agent/servers/github_action_runner.py"}, "function": "run_action", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 75, "message": "Applying repo settings", "module": "github_action_runner", "name": "__main__", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 1111, "name": "MainThread"}, "time": {"repr": "2025-01-02 09:57:46.808071+00:00", "timestamp": 1735811866.808071}}}
Traceback (most recent call last):
  File "/app/pr_agent/servers/github_action_runner.py", line 160, in <module>
    asyncio.run(run_action())
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line [11](https://github.com/gojue/ecapture/actions/runs/12580615342/job/35062859741#step:3:12)8, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.[12](https://github.com/gojue/ecapture/actions/runs/12580615342/job/35062859741#step:3:13)/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/app/pr_agent/servers/github_action_runner.py", line [15](https://github.com/gojue/ecapture/actions/runs/12580615342/job/35062859741#step:3:16)6, in run_action
    await PRAgent().handle_request(url, body)
  File "/app/pr_agent/agent/pr_agent.py", line 59, in handle_request
    action, *args = list(lexer)
                    ^^^^^^^^^^^
  File "/usr/local/lib/python3.12/shlex.py", line 300, in __next__
    token = self.get_token()
            ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/shlex.py", line 109, in get_token
    raw = self.read_token()
          ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/shlex.py", line [19](https://github.com/gojue/ecapture/actions/runs/12580615342/job/35062859741#step:3:20)1, in read_token
    raise ValueError("No closing quotation")
ValueError: No closing quotation
@mrT23
Copy link
Collaborator

mrT23 commented Jan 2, 2025

i copied your configuration and was able to run it:

image
image

Are you sure that the command you used to trigger qodo merge was valid ?

Somehow it was triggered from here:
gojue/ecapture#712
But Qodo Merge does not give feedback on issues

@cfc4n
Copy link
Author

cfc4n commented Jan 2, 2025

Thanks for the reply.

Somehow it was triggered from here: gojue/ecapture#712
But Qodo Merge does not give feedback on issues

Yes, this is another question I have.

In addition, I still have a question: when receiving a PR, why did PR_Agent not actively run the detection, but required me to send characters such as /review in the comment before it would run it.

@mrT23
Copy link
Collaborator

mrT23 commented Jan 2, 2025

@mrT23
Copy link
Collaborator

mrT23 commented Jan 2, 2025

Anyway, another alternative you have. that will surely work, is this:

https://github.com/apps/qodo-merge-pro-for-open-source/

@cfc4n
Copy link
Author

cfc4n commented Jan 4, 2025

OPENAI_KEY This key is configured. Still not sure why this happens.

Anyway, another alternative you have. that will surely work, is this:

https://github.com/apps/qodo-merge-pro-for-open-source/

However, I plan to continue using this GitHub Action.

@mrT23
Copy link
Collaborator

mrT23 commented Jan 4, 2025

We cannot debug your personal deployment. you have something wrong there. probably related to the key.
Triple-check it against the installation instructions: https://qodo-merge-docs.qodo.ai/installation/github/

The github action works
Codium-ai/codium-code-examples#53
https://github.com/Codium-ai/codium-code-examples/blob/main/.github/workflows/pr-agent.yaml

@mrT23 mrT23 added the answered label Jan 4, 2025
@cfc4n
Copy link
Author

cfc4n commented Jan 4, 2025

Yes, I checked and the configuration is consistent with the documentation.

@mrT23
Copy link
Collaborator

mrT23 commented Jan 6, 2025

open a new PR, and show that the auto tools don't work. share its link
(notice that you restricted all the github actions. they will only work if an admin opens the PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants