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

TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args #18

Closed
JakobP opened this issue Jun 6, 2019 · 4 comments · Fixed by #19
Labels

Comments

@JakobP
Copy link

JakobP commented Jun 6, 2019

When following the setup guide on MacOs 10.14 and Ubuntu 18.04 I get an abstract methods error. I installed on a new Ubuntu 18.04 machine when testing.

Tried with both Python 2.7 and Python 3.6

vagrant@ubuntu-bionic:/vagrant/provisioning$ ansible-playbook-grapher --help
Traceback (most recent call last):
  File "/home/vagrant/.local/bin/ansible-playbook-grapher", line 11, in <module>
    sys.exit(main())
  File "/home/vagrant/.local/lib/python2.7/site-packages/ansibleplaybookgrapher/cli.py", line 85, in main
    cli = PlaybookGrapherCLI(args)
TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args

@haidaraM
Copy link
Owner

haidaraM commented Jun 6, 2019

Which version of ansible are you using ?

@haidaraM haidaraM added the bug label Jun 6, 2019
@haidaraM
Copy link
Owner

haidaraM commented Jun 6, 2019

I guess it's ansible 2.8. Was able to reproduce in Travis: https://travis-ci.org/haidaraM/ansible-playbook-grapher/builds/542466763

@ric79
Copy link

ric79 commented Jun 6, 2019

Same error

$ pip freeze | grep ansible-playbook-grapher
ansible-playbook-grapher==0.9.0

]$ ansible --version
ansible 2.8.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/xxxxx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

$ more prova.yml
- name: Create nodeX
  hosts: localhost

  tasks:

   - debug:
       msg="CIAO"

$ ansible-playbook-grapher prova.yml
Traceback (most recent call last):
  File "/usr/bin/ansible-playbook-grapher", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/ansibleplaybookgrapher/cli.py", line 85, in main
    cli = PlaybookGrapherCLI(args)
TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args

haidaraM pushed a commit that referenced this issue Jun 6, 2019
This change is needed because of ansible/ansible#50069.
The new CLI in this PR should be used in the future when we drop support
for Ansible < 2.8
haidaraM pushed a commit that referenced this issue Jun 9, 2019
This change is needed because of ansible/ansible#50069.

The new CLI in this PR should be used in the future when we drop support
for Ansible < 2.8
@haidaraM
Copy link
Owner

haidaraM commented Jun 9, 2019

Fixed in 0.9.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants