-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Labels
Milestone
Description
I am seeing errors related to a recent python update. Whenever I interact with the slcli
in a python 3.7 environment I am getting errors on some commands.
Expected Behavior
Return a list of servers/resources
Actual Behavior
When invoking certain calls the slcli
is throwing errors. It appears that these may be related to a change to generators.
Environment Information
Operating System:
(slcli-python3-7) ☁ ~ mac info
sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E199
Python version:
(slcli-python3-7) ☁ ~ python3 --version
Python 3.7.0
CLI Version
(slcli-python3-7) ☁ ~ which slcli
/Users/ryan/.virtualenvs/slcli-python3-7/bin/slcli
(slcli-python3-7) ☁ ~ /Users/ryan/.virtualenvs/slcli-python3-7/bin/slcli --version
slcli (SoftLayer Command-line), version 5.5.1
Here is the error when running a list on virtual server instances:
(slcli-python3-7) ☁ ~ slcli vs list -d wdc07
An unexpected error has occured:
Traceback (most recent call last):
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/API.py", line 316, in iter_call
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/CLI/core.py", line 182, in main
cli.main(**kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/CLI/virt/list.py", line 85, in cli
limit=limit)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/decoration.py", line 44, in f_retry
return func(*args, **kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/managers/vs.py", line 162, in list_instances
return self.client.call('Account', call, **kwargs)
File "/Users/ryan/.virtualenvs/slcli-python3-7/lib/python3.7/site-packages/SoftLayer/API.py", line 219, in call
return list(self.iter_call(service, method, *args, **kwargs))
RuntimeError: generator raised StopIteration
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
If I switch back to 3.6 I do not encounter any errors:
☁ ~ brew switch python 3.6.5_1
Cleaning /usr/local/Cellar/python/3.7.0
Cleaning /usr/local/Cellar/python/3.6.5_1
25 links created for /usr/local/Cellar/python/3.6.5_1
☁ ~ mkvirtualenv --python=/usr/local/bin/python3.6 slcli-python3-6
(output output output)
(slcli-python3-6) ☁ ~ python --version
Python 3.6.5
(slcli-python3-6) ☁ ~ slcli vs list -d wdc07
59071703 Veeam18 NULL 10.190.79.214 wdc07 NULL
58966135 WinADrtvcf NULL 10.190.79.230 wdc07 NULL
59092801 jumpbox x.x.x.x 10.190.150.117 wdc07 NULL