vsphere-automation-sdk-python icon indicating copy to clipboard operation
vsphere-automation-sdk-python copied to clipboard

Missing __init__.py in v8.0.3.0

Open hupebln opened this issue 1 year ago • 2 comments

Describe the bug

We tried to use the SDK (v8.0.3.0) in a runner in SaltStack, but always just got an error message. Error message: ModuleNotFoundError: No module named 'vmware.vapi'; 'vmware' is not a package

It turned out that the __init__.py is missing in the vmware-vcenter package. I could fix it by just adding a blank __init__.py to /opt/saltstack/salt/extras-3.10/vmware/__init__.py.

In older versions of the SDK the __init__.py exists and the error doesn't appear.

Reproduction steps

  1. Install SaltStack (in our case version 3006.8)
  2. Write a runner module for SaltStack and try to import anything from vmware (like from vmware.vapi.vsphere.client import VsphereClient)
  3. Try to execute the runner (e.g. salt-run mymodule.myfunction)

Expected behavior

The runner can import the external module.

Additional context

No response

hupebln avatar Jul 26 '24 07:07 hupebln