Hi
Whenever I import the SDK python modules into the script I get this error:
Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from com.vmware import nsx_client
<unknown>:1: SyntaxWarning: invalid escape sequence '\['
<unknown>:1: SyntaxWarning: invalid escape sequence '\['
>>>
It's "only" the first time an import is done, that the error pops up, all subsequent import don't produce this error.
First import of all these produces the same error:
from com.vmware import nsx_client
from com.vmware import nsx_policy_client
from vmware.vapi.bindings.stub import ApiClient
from vmware.vapi.bindings.stub import StubFactory
from vmware.vapi.stdlib.client.factories import StubConfigurationFactory
This import never does it:
from vmware.vapi.security.user_password import create_user_password_security_context
I have downloaded and installed the following modules:
VMware Python SDK for NSX
VMware Python SDK for NSX Policy
VMware Python SDK runtime
VMware Python SDK runtime support
VMware Python SDK runtime support - client utilities
from https://developer.broadcom.com/sdks/vmware-nsx-for-python/latest/ so it is newest version 4.0.1.1. Python version is 3.13.2.
I believe it is an error in the SDK, much like this issue fixed in the vsphere module: from vmware.vapi.vsphere.client import create_vsphere_client · Issue #400 · vmware/vsphere-automation-sdk-python
Can we get someone to take a look at the SDK, please?
------------------------------
Life Goal: Rule the world with Python
------------------------------