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

ModuleNotFoundError: No module named 'yaml' (fixed) #189

Closed
Mindgames opened this issue Aug 9, 2023 · 6 comments
Closed

ModuleNotFoundError: No module named 'yaml' (fixed) #189

Mindgames opened this issue Aug 9, 2023 · 6 comments
Labels

Comments

@Mindgames
Copy link

Running into following issue

Run Codium-ai/pr-agent@main
/usr/bin/docker run --name bedb4853746a2bef44f7888dad2cd8a27189f_7b7377 --label 5bedb4 --workdir /github/workspace --rm -e "OPENAI_KEY" -e "GITHUB_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/A1_core/A1_core":"/github/workspace" 5bedb4:853746a2bef44f7888dad2cd8a27189f
Traceback (most recent call last):
  File "/app/pr_agent/servers/github_action_runner.py", line 5, in <module>
    from pr_agent.agent.pr_agent import PRAgent
  File "/app/pr_agent/agent/pr_agent.py", line 6, in <module>
    from pr_agent.algo.utils import update_settings_from_args
  File "/app/pr_agent/algo/utils.py", line 11, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

Using

on:
  pull_request:
  issue_comment:
jobs:
  pr_agent_job:
    runs-on: ubuntu-latest
    name: Run pr agent on every pull request, respond to user comments
    steps:
      - name: PR Agent action step
        id: pragent
        uses: Codium-ai/pr-agent@main
        env:
          OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@Mindgames
Copy link
Author

FYI: Was working perfectly, no changes on our side, seem to be something with your latest update.

@szecsip
Copy link
Contributor

szecsip commented Aug 9, 2023

I've been experiencing similar issues for a few hours now.

@mrkmcknz
Copy link

mrkmcknz commented Aug 9, 2023

Same here.

Traceback (most recent call last):
  File "/app/pr_agent/servers/github_action_runner.py", line 5, in <module>
    from pr_agent.agent.pr_agent import PRAgent
  File "/app/pr_agent/agent/pr_agent.py", line 6, in <module>
    from pr_agent.algo.utils import update_settings_from_args
  File "/app/pr_agent/algo/utils.py", line [11](https://github.com/Apollo-xyz/apollo-api/actions/runs/5814083083/job/15763034821?pr=319#step:3:12), in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

@coditamar
Copy link
Contributor

Can you please add PyYAML to the requirements.txt and see if it works for you?

@chl03ks
Copy link

chl03ks commented Aug 9, 2023

same here, how can we fix this if we are using the github action ?

@okotek
Copy link
Contributor

okotek commented Aug 9, 2023

Fixed.

@okotek okotek added the fixed label Aug 9, 2023
@okotek okotek changed the title ModuleNotFoundError: No module named 'yaml' ModuleNotFoundError: No module named 'yaml' (fixed) Aug 9, 2023
@mrT23 mrT23 closed this as completed Aug 17, 2023
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

7 participants