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: connect() got an unexpected keyword argument 'api_version' #3

Open
domingusj opened this issue Jan 29, 2016 · 7 comments
Open

Comments

@domingusj
Copy link

Thanks for your work on this and I'm hoping I can get it working. I updated puppetdb.yml with my info:

host: 10.2.0.10
api_version: 3
port: 8081
timeout: 10
ssl_verify: False
ssl_key:
ssl_cert:
cache_file: '/tmp/ansible-inventory-puppetdb.cache'
cache_duration: 30
group_by:
group_by_tag:

but when I run ./puppetdb.py --list I get:

Traceback (most recent call last): File "./puppetdb.py", line 234, in <module> main() File "./puppetdb.py", line 226, in main inventory = PuppetdbInventory(args.refresh) File "./puppetdb.py", line 86, in __init__ self.puppetdb = connect(**puppetdb_config) TypeError: connect() got an unexpected keyword argument 'api_version'

Any ideas?

@domingusj domingusj changed the title TypeError: connect() got an unexpected keyword argument 'api_version'``` TypeError: connect() got an unexpected keyword argument 'api_version' Jan 29, 2016
@Techcadia
Copy link
Contributor

Your running the newer version of pypuppetdb

Make sure you install the 0.1.1 branch not master and this will resolve itself.

@domingusj
Copy link
Author

Gotcha, I will give that a try, thank you for the response!

@xtavras
Copy link

xtavras commented May 13, 2016

Hi @Techcadia ,I think version 0.1.1 doesn't support puppetdb 4.0., any chance to update script for using pypuppetdb 0.2.2 and puppetdb api version 4?

@dmsimard
Copy link
Owner

I think this was fixed by #5 - it's been merged.

@sedunne
Copy link

sedunne commented Jun 10, 2016

I may be mistaken, but doesn't #5 make this incompatible with the 0.1.x version of pypuppetdb (which needs the api_version)? I don't have an older version setup to test with, but I can do a pr, which should allow both versions of pypuppetdb to work.

@dmsimard
Copy link
Owner

A backwards compatible change would be welcome.

@sedunne
Copy link

sedunne commented Jun 10, 2016

PR #6 should allow both versions of pypuppetdb to work. I've used it with Puppet DB 4, but unfortunately don't have access to an older install to test that with.

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

No branches or pull requests

5 participants