Bug 2238022 - [abrt] python3-ansible-lint: get_cache_dir(): prerun.py:13:get_cache_dir:AttributeError: 'str' object has no attribute 'resolve'
Summary: [abrt] python3-ansible-lint: get_cache_dir(): prerun.py:13:get_cache_dir:Attr...
Keywords:
Status: CLOSED DUPLICATE of bug 2213747
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible-lint
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:c5641727f0be9df4880e0686f83...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-08 14:28 UTC by HoracioDos
Modified: 2023-09-18 06:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-09-18 06:15:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.02 KB, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: cgroup (119 bytes, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: cpuinfo (3.01 KB, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: environ (2.75 KB, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: mountinfo (5.39 KB, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: namespaces (172 bytes, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details
File: open_fds (1.86 KB, text/plain)
2023-09-08 14:28 UTC, HoracioDos
no flags Details

Description HoracioDos 2023-09-08 14:28:44 UTC
Description of problem:
ansible-lint error:
ansible-lint  --offline --nocolor -f codeclimate "/home/horacio/playbook.yml"
Traceback (most recent call last):
  File "/usr/bin/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 344, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 197, in main
    initialize_options(argv[1:])
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 110, in initialize_options
    options.cache_dir = get_cache_dir(options.project_dir)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansible_compat/prerun.py", line 13, in get_cache_dir
    basename = project_dir.resolve().name.encode(encoding="utf-8")
               ^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'resolve'

Version-Release number of selected component:
python3-ansible-lint-1:6.10.0-1.fc37

Additional info:
reporter:       libreport-2.17.11
cmdline:        /usr/bin/python3 -sP /bin/ansible-lint --version
crash_function: get_cache_dir
exception_type: AttributeError
executable:     /bin/ansible-lint
interpreter:    python3-3.11.4-1.fc37.x86_64
kernel:         6.4.13-100.fc37.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
prerun.py:13:get_cache_dir:AttributeError: 'str' object has no attribute 'resolve'

Traceback (most recent call last):
  File "/bin/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 344, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 197, in main
    initialize_options(argv[1:])
  File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 110, in initialize_options
    options.cache_dir = get_cache_dir(options.project_dir)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansible_compat/prerun.py", line 13, in get_cache_dir
    basename = project_dir.resolve().name.encode(encoding="utf-8")
               ^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'resolve'

Local variables in innermost frame:
project_dir: '.'

Comment 1 HoracioDos 2023-09-08 14:28:47 UTC
Created attachment 1987719 [details]
File: backtrace

Comment 2 HoracioDos 2023-09-08 14:28:49 UTC
Created attachment 1987720 [details]
File: cgroup

Comment 3 HoracioDos 2023-09-08 14:28:50 UTC
Created attachment 1987721 [details]
File: cpuinfo

Comment 4 HoracioDos 2023-09-08 14:28:51 UTC
Created attachment 1987722 [details]
File: environ

Comment 5 HoracioDos 2023-09-08 14:28:52 UTC
Created attachment 1987723 [details]
File: mountinfo

Comment 6 HoracioDos 2023-09-08 14:28:54 UTC
Created attachment 1987724 [details]
File: namespaces

Comment 7 HoracioDos 2023-09-08 14:28:55 UTC
Created attachment 1987725 [details]
File: open_fds

Comment 8 Parag Nemade 2023-09-18 06:15:46 UTC

*** This bug has been marked as a duplicate of bug 2213747 ***


Note You need to log in before you can comment on or make changes to this bug.