请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

ValueError: too many values to unpack (expected 2)

执行:python3 contrib/inventory_builder/inventory.py ${IPS[@]}出现以下错误

DEBUG: Adding group all
DEBUG: Adding group kube-master
DEBUG: Adding group kube-node
DEBUG: Adding group etcd
DEBUG: Adding group k8s-cluster
DEBUG: Adding group calico-rr
Traceback (most recent call last):
File “contrib/inventory_builder/inventory.py”, line 431, in
sys.exit(main())
File “contrib/inventory_builder/inventory.py”, line 427, in main
KubesprayInventory(argv, CONFIG_FILE)
File “contrib/inventory_builder/inventory.py”, line 98, in init
self.hosts = self.build_hostnames(changed_hosts)
File “contrib/inventory_builder/inventory.py”, line 186, in build_hostnames
ip, access_ip = host.split(’,’)
ValueError: too many values to unpack (expected 2)

正在回答 回答被采纳积分+3

1回答

刘果国 2021-08-07 09:09:25

根据报错的提示,仔细检查一下配置文件格式

1 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信