Just run ansible-lint with or without parameters and get several errors. Example "AttributeError: module 'pathlib' has no attribute '_posix_flavour'"

Bug #2067162 reported by Jani Markkanen
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ansible-lint (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

$ ansible-lint
Traceback (most recent call last):
  File "/usr/bin/ansible-lint", line 5, in <module>
    from ansiblelint.__main__ import _run_cli_entrypoint
  File "/usr/lib/python3/dist-packages/ansiblelint/__main__.py", line 39, in <module>
    from ansiblelint import cli
  File "/usr/lib/python3/dist-packages/ansiblelint/cli.py", line 20, in <module>
    from ansiblelint.file_utils import (
  File "/usr/lib/python3/dist-packages/ansiblelint/file_utils.py", line 15, in <module>
    import wcmatch.pathlib
  File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 218, in <module>
    class PurePosixPath(PurePath):
  File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 221, in PurePosixPath
    _flavour = pathlib._posix_flavour # type: ignore[attr-defined]
               ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pathlib' has no attribute '_posix_flavour'

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ansible-lint 6.17.2-1
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat May 25 18:38:36 2024
PackageArchitecture: all
SourcePackage: ansible-lint
UpgradeStatus: Upgraded to noble on 2024-05-25 (0 days ago)

Revision history for this message
Jani Markkanen (janimarkkanen) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ansible-lint (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.