ansible / ansible-lint-action

❗️Replaced by https://github.com/marketplace/actions/run-ansible-lint
https://github.com/marketplace/actions/run-ansible-lint
MIT License
254 stars 132 forks source link

cannot import name 'render_group' from 'rich.console' #61

Closed dynamicat closed 2 years ago

dynamicat commented 2 years ago

I am running the linter with this declaration:

     - name: run ansible linter
        uses: ansible/ansible-lint-action@v4.1.0.post0
        with:
          targets: ${{ github.workspace }}
          args: "-x indentation,meta-no-info -r ."

I have tried changing the tag and the targets but nothing seems to work.

Run ansible/ansible-lint-action@master
/usr/bin/docker run --name ea2bfa2ebd86b4ec1bbdc1682b73ab68c_7cafce --label 84217e --workdir /github/workspace --rm -e INPUT_TARGETS -e INPUT_ARGS -e INPUT_OVERRIDE-DEPS -e TARGETS -e OVERRIDE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -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/ansible-roles/ansible-roles":"/github/workspace" 84217e:a2bfa2ebd86b4ec1bbdc1682b73ab68c  "-x indentation,meta-no-info -r ."
/github/workspace /github/workspace
+ args=("$@")
+ '[' /entrypoint.sh = /entrypoint.sh ']'
+ echo -E '\nRunning Ansible Lint...\n'
\nRunning Ansible Lint...\n
+ ansible::lint '-x indentation,meta-no-info -r .'
+ : ./
+ : /github/workspace
+ pushd /github/workspace
+ override_python_packages
+ [[ -n '' ]]
+ echo 'Completed installing override dependencies...'
Completed installing override dependencies...
+ local opts
++ parse_args -x indentation,meta-no-info -r .
++ local opts=
++ ((  4  ))
++ case "$1" in
++ opts=' -x indentation,meta-no-info'
++ shift 2
++ ((  2  ))
++ case "$1" in
++ opts=' -x indentation,meta-no-info -r .'
++ shift 2
++ ((  0  ))
++ eval set -- ' -x indentation,meta-no-info -r .'
+++ set -- -x indentation,meta-no-info -r .
++ echo '-x indentation,meta-no-info -r .'
++ return 0
+ opts='-x indentation,meta-no-info -r .'
+ shopt -s globstar
+ ansible-lint -v --force-color -x indentation,meta-no-info -r . ./
Traceback (most recent call last):
  File "/usr/local/bin/ansible-lint", line 5, in <module>
    from ansiblelint.__main__ import main
  File "/usr/local/lib/python3.8/site-packages/ansiblelint/__main__.py", line 37, in <module>
    from ansiblelint.generate_docs import rules_as_rich, rules_as_rst
  File "/usr/local/lib/python3.8/site-packages/ansiblelint/generate_docs.py", line 6, in <module>
    from rich.console import render_group
ImportError: cannot import name 'render_group' from 'rich.console' (/usr/local/lib/python3.8/site-packages/rich/console.py)

Any ideas on how to fix this?