Open davehouser1 opened 3 years ago
Hi, Anyone has a solution for this issue on centos8/python3.
Hello @davehouser1 and @Rajeshunix13
Sorry for the long time to answer. I'll check this out ASAP.
Thanks for the heads up
@waldirio Getting the same error. can you please help with this?
I am using rvtools-python==0.0.1
Datacenter: ha-datacenter
Traceback (most recent call last):
File "/home/ansible/test/bin/rvtools", line 8, in <module>
rvtools.main()
File "/home/ansible/test/lib/python3.8/site-packages/rvtools/rvtools.py", line 92, in main
vinfo_collect(service_instance, directory)
File "/home/ansible/test/lib/python3.8/site-packages/rvtools/vinfo/vinfo.py", line 361, in vinfo_collect
cluster = get_obj(content, [vim.ClusterComputeResource])
File "/home/ansible/test/lib/python3.8/site-packages/rvtools/vinfo/vinfo.py", line 8, in get_obj
obj = container.view[0].name
IndexError: list index out of range
Hello. This error appends when there is no cluster defined. Here: cluster = get_obj(content, [vim.ClusterComputeResource]) print("Cluster: {}".format(cluster)) vinfo_data['cluster'] = str(cluster)
lastest version do not fix this issue.
Bye.
Hello @bugcy013 @Rajeshunix13 @davehouser1 and @eyryve
I pushed one new version via pip, with that said, you can update the package and try once again.
Please, let me know if you are still facing issues, then I'll move on.
Thank you for your help and sorry for my delay. Waldirio
Full error:
Here is the function where it is failing:
Trouble shooting:
Here is the output I get now:
Workaround
I am not a python guru, so any feedback you could provide would be helpful. It looks like the function is trying to pull the datacenter name out of the object, and it looks like it succeeds based on the sytnax
container.view[0].name
, but for whatever reason the get_obj function fails.