reviewdog / reviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language

Home Page:https://medium.com/@haya14busa/reviewdog-a-code-review-dog-who-keeps-your-codebase-healthy-d957c471938b#.8xctbaw5u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`action-flake8` is broken due to an update in `astroid`

sstendahl opened this issue · comments

See title, when running the Flake8 workflow using reviewdog, I'm getting the following error:

Run reviewdog/action-flake8@v3
Run $GITHUB_ACTION_PATH/entrypoint.sh
[action-flake8] Installing reviewdog...
reviewdog/reviewdog info checking GitHub for tag 'v0.15.0'
reviewdog/reviewdog info found version: 0.15.0 for v0.15.0/Linux/x86_64
reviewdog/reviewdog info installed /tmp/reviewdog
[action-flake8] Flake8 version:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/plugins/finder.py", line 291, in _load_plugin
    obj = plugin.entry_point.load()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8_warnings/__init__.py", line 4, in <module>
    from ._flake8_plugin import Flake8Checker
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8_warnings/_flake8_plugin.py", line 6, in <module>
    from ._finder import WarningFinder
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8_warnings/_finder.py", line 10, in <module>
    from ._extractors import EXTRACTORS, Extractor, WarningInfo
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8_warnings/_extractors/__init__.py", line 7, in <module>
    from ._warnings import WarningsExtractor
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8_warnings/_extractors/_warnings.py", line 11, in <module>
    astroid.TryExcept,
AttributeError: module 'astroid' has no attribute 'TryExcept'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/main/application.py", line 186, in _run
    self.initialize(argv)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/main/application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/options/parse_args.py", line 42, in parse_args
    plugins = finder.load_plugins(raw_plugins, plugin_opts)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/plugins/finder.py", line 365, in load_plugins
    return _classify_plugins(_import_plugins(plugins, opts), opts)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/plugins/finder.py", line 307, in _import_plugins
    return [_load_plugin(p) for p in plugins]
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/plugins/finder.py", line 307, in <listcomp>
    return [_load_plugin(p) for p in plugins]
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/flake8/plugins/finder.py", line 293, in _load_plugin
    raise FailedToLoadPlugin(plugin.package, e)
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "flake8-warnings" due to module 'astroid' has no attribute 'TryExcept'.
Error: Process completed with exit code 1.

It seems astroid had a new release 40 minutes ago, which is probably the issue here. One option would probably to pin the version, if that's indeed the issue.

I realize this is an issue in flake8-warnings, not in reviewdog. There's PR's that solve this issue there. Closing this issue, as this is the wrong repo anyway.