Closed kunal-pmj closed 10 months ago
Have the same problem, but it looks like it is a later change. in an somewhat older install it works as expected. On a fresh install I get following stacktrace on debug:
File "/tmp/pycharm_project_535/src/vcenter_inventory/commands/command.py", line 101, in wait_for_task
WaitForTask(vmtask, onProgressUpdate=self.print_task_progress)
File "/home/xxxx/.virtualenvs/vcenter-inventory/lib/python3.10/site-packages/pyVim/task.py", line 126, in WaitForTask
filter = CreateFilter(pc, task)
File "/home/xxxx/.virtualenvs/vcenter-inventory/lib/python3.10/site-packages/pyVim/task.py", line 266, in CreateFilter
return CreateTasksFilter(pc, [task])
File "/home/xxxx/.virtualenvs/vcenter-inventory/lib/python3.10/site-packages/pyVim/task.py", line 275, in CreateTasksFilter
objspecs = [
File "/home/xxxx/.virtualenvs/vcenter-inventory/lib/python3.10/site-packages/pyVim/task.py", line 276, in <listcomp>
vmodl.Query.PropertyCollector.ObjectSpec(obj=task) for task in tasks
File "/home/xxxx/.virtualenvs/vcenter-inventory/lib/python3.10/site-packages/pyVmomi/VmomiSupport.py", line 249, in __getattr__
raise AttributeError(attr)
AttributeError: Query. Did you mean: 'query'?
The issue has been fixed
Describe the bug
taks.WaitForTask broken on version >8.0.0.
The issue has been reported against pyvmomi
Reproduction steps
Run any sample which involves
pyVim.task.WaitForTask()
e.g. managing disks sample
Expected behavior
The sample should execure fine
Additional context
No response