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: cli() got an unexpected keyword argument 'v4' when run "slcli subnet list" #1060

Closed
yingjunyj opened this issue Oct 26, 2018 · 2 comments
Assignees
Labels

Comments

@yingjunyj
Copy link

Please triple-check to make sure that you have properly masked out user credentials like usernames, passwords and API keys before submitting your issue

Expected Behavior

after run "slcli subnet list", I expect it spits out the subnet list. "slcli vlan list", "slcli vs list" all work as expected, only "slcli subnet list" has issue.

Actual Behavior

slcli subnet list

An unexpected error has occured:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/SoftLayer/CLI/core.py", line 182, in main
cli.main(**kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
TypeError: cli() got an unexpected keyword argument 'v4'

Feel free to report this error as it is likely a bug:
https://github.com/softlayer/softlayer-python/issues
The following snippet should be able to reproduce the error

Environment Information

Operating System:
softlayer-python version (slcli --version):

slcli --version

slcli (SoftLayer Command-line), version 5.6.0

@allmightyspiff
Copy link
Member

Looks like this is a result of updating Click.

@acamacho82 Can you also make sure to add a unit test for slcli subnet list so we don't run into this problem again. Or if there is already a test see why it didn't catch this problem.

pallets/click#1140 has some more details on this bug. I think you just need to change
def cli(env, sortby, datacenter, identifier, subnet_type, network_space, ipv4, ipv6):
to be
def cli(env, sortby, datacenter, identifier, subnet_type, network_space, v4, v6):

allmightyspiff added a commit to allmightyspiff/softlayer-python that referenced this issue Nov 16, 2018
allmightyspiff added a commit that referenced this issue Nov 16, 2018
@allmightyspiff
Copy link
Member

This is fixed in master now, and will be included in 5.6.4.

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

No branches or pull requests

3 participants