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

GitHub actions fail due to flake8 not working anymore #340

Closed
thjsal opened this issue Nov 4, 2023 · 0 comments · Fixed by #341
Closed

GitHub actions fail due to flake8 not working anymore #340

thjsal opened this issue Nov 4, 2023 · 0 comments · Fixed by #341
Labels
bug Something isn't working

Comments

@thjsal
Copy link
Contributor

thjsal commented Nov 4, 2023

Seems that our GitHub Actions (continuous integration -tests in particular) are now failing because flake8 used for pytesting is not working anymore perhaps due to an inconsistent version of importlib-metadata package (error message is similar to that one here: PyCQA/flake8#1701):

Run # stop the build if there are Python syntax errors or undefined names
Traceback (most recent call last):
  File "/home/runner/micromamba-root/envs/xpsipy3/bin/flake8", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.[12](https://github.com/xpsi-group/xpsi/actions/runs/6755894386/job/18364788186#step:7:13)/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/main/application.py", line 375, in run
    self._run(argv)
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/main/application.py", line 363, in _run
    self.initialize(argv)
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/main/application.py", line 343, in initialize
    self.find_plugins(config_finder)
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/main/application.py", line [15](https://github.com/xpsi-group/xpsi/actions/runs/6755894386/job/18364788186#step:7:16)7, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 363, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/plugins/manager.py", line [24](https://github.com/xpsi-group/xpsi/actions/runs/6755894386/job/18364788186#step:7:25)3, in __init__
    self._load_entrypoint_plugins()
  File "/home/runner/micromamba-root/envs/xpsipy3/lib/python3.12/site-packages/flake8/plugins/manager.py", line [26](https://github.com/xpsi-group/xpsi/actions/runs/6755894386/job/18364788186#step:7:27)1, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'
Error: Process completed with exit code 1.

I already tried to fix this by adding

    - name: Make sure metadata not too new for flake8
      run: |
        pip install "importlib-metadata<5.0"

into the .github/workflows/ci_tests.yml file in this pull request #338 , but that did not help (still the same error).

@thjsal thjsal added the bug Something isn't working label Nov 4, 2023
@thjsal thjsal linked a pull request Nov 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant