I had Ansible installed with brew, then I uninstalled an unrelated package which removed a bunch of dependencies and now I get this error:
ERROR! Unexpected Exception, this is probably a bug: module ‘argcomplete’ has no attribute ‘autocomplete’
I’ve tried variations of brew uninstall ansible
and pip3 install ansible
and uninstall with no luck.
ansible
ERROR! Unexpected Exception, this is probably a bug: module 'argcomplete' has no attribute 'autocomplete'
the full traceback was:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/ansible/9.6.0/libexec/lib/python3.12/site-packages/ansible/cli/__init__.py", line 659, in cli_executor
exit_code = cli.run()
^^^^^^^^^
File "/opt/homebrew/Cellar/ansible/9.6.0/libexec/lib/python3.12/site-packages/ansible/cli/adhoc.py", line 104, in run
super(AdHocCLI, self).run()
File "/opt/homebrew/Cellar/ansible/9.6.0/libexec/lib/python3.12/site-packages/ansible/cli/__init__.py", line 156, in run
self.parse()
File "/opt/homebrew/Cellar/ansible/9.6.0/libexec/lib/python3.12/site-packages/ansible/cli/__init__.py", line 462, in parse
argcomplete.autocomplete(self.parser)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'argcomplete' has no attribute 'autocomplete'
Mostly posting here because I’ll find the answer at some point and post the answer here when I do.