pyvmomi icon indicating copy to clipboard operation
pyvmomi copied to clipboard

Invalid automatic type import

Open IvarVirusiim opened this issue 1 year ago • 1 comments

Describe the bug

When trying to import using PyCharm, using for example VirtualMachine, it imports pyVmomi.vim.VirtualMachine, but the correct import is vim.VirtualMachine. This causes errors during runtime.

Reproduction steps

  1. Try to import some type automatically image

  2. Run the code and get error: ImportError: cannot import name 'VirtualMachine' from 'pyVmomi.vim' (unknown location)

Expected behavior

Import would be correct: from vim import VirtualMachine

Additional context

No response

IvarVirusiim avatar Jun 08 '23 12:06 IvarVirusiim