glasslion / aliyun-machine-learning-for-dummies

阿里云 ECS 机器学习环境搭建懒人包
19 stars 7 forks source link

'SecurityGroupsSelect' object has no attribute 'VpcId' #2

Open xiabai84 opened 4 years ago

xiabai84 commented 4 years ago

Hi, 在配置 ECS 实例的安全组的时候,我做了以下操作:

可选的 安全组: [0] - sg-ds-workstation-linux(安全组名称blablala) 我选择了 0 然后回车

出现以下报错

Traceback (most recent call last): File "start_instance.py", line 117, in main() File "/Users/bai/.virtualenvs/ali-cloud/lib/python3.7/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/Users/bai/.virtualenvs/ali-cloud/lib/python3.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/Users/bai/.virtualenvs/ali-cloud/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/Users/bai/.virtualenvs/ali-cloud/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "start_instance.py", line 31, in main config.config_via_prompt() File "/Users/bai/IdeaProjects/aliyun-machine-learning-for-dummies/utils/init.py", line 130, in config_via_prompt SecurityGroupsSelect(self).show() File "/Users/bai/IdeaProjects/aliyun-machine-learning-for-dummies/utils/select.py", line 41, in show self.handle_selected_item(items[idx]) File "/Users/bai/IdeaProjects/aliyun-machine-learning-for-dummies/utils/security.py", line 28, in handle_selected_item self.set_VSwitchId(item['VpcId']) File "/Users/bai/IdeaProjects/aliyun-machine-learning-for-dummies/utils/security.py", line 74, in set_VSwitchId request.set_VpcId(self.VpcId) AttributeError: 'SecurityGroupsSelect' object has no attribute 'VpcId'

需要有什么特殊配置吗? 括号里面的部分就是应该这个 VpcId 吧?

xiabai84 commented 4 years ago

看了你代码,你默认的是用户没有配置安全组,而且你的程序帮忙配置了jupyter 的 tcp 端口为 8888。 这个和你的 README 描述不符。