Closed segadson-zz closed 3 years ago
It is likely that you have not installed the SDK properly.
Can you try the import statement from com.vmware.content_client import LibraryModel
in a python shell?
@segadson
Any update?
Hello,
Yea this worked thanks!
Sean Gadson @. @.%0b> Mobile: 614.301.0695
From: Anusha Hegde @.> Sent: Monday, March 15, 2021 12:46 AM To: vmware/vsphere-automation-sdk-python @.> Cc: segadson @.>; Mention @.> Subject: Re: [vmware/vsphere-automation-sdk-python] import com.vmware.content.library_client failing (#249)
@segadson https://github.com/segadson
Any update?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vmware/vsphere-automation-sdk-python/issues/249#issuecomment-799086211 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKWR7YKAFPNTH5DIIEV663TDWGHTANCNFSM4TZ2QDGA . https://github.com/notifications/beacon/ADKWR726E6FUFCCB4P6XDWTTDWGHTA5CNFSM4TZ2QDGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF6QRNAY.gif
Environment
sdk package version:
ansible (2.8.0) asn1crypto (1.3.0) Babel (2.5.1) bcrypt (3.2.0) certifi (2019.11.28) cffi (1.13.2) chardet (3.0.4) configobj (5.0.6) cryptography (2.8) dataclasses (0.8) dbus-python (1.2.4) decorator (4.2.1) dnspython (1.16.0) email-validator (1.1.2) gpg (1.10.0) idna (2.8) iniparse (0.4) isc (2.0) Jinja2 (2.10.3) jmespath (0.9.4) lxml (4.4.2) MarkupSafe (1.1.1) nftables (0.1) nsx-global-policy-python-sdk (3.0.0.0.0.15946039) nsx-policy-python-sdk (3.0.0.0.0.15946039) nsx-python-sdk (3.0.0.0.0.15946039) paramiko (2.7.2) perf (0.1) pip (9.0.3) ply (3.9) pyartifactory (1.8.0) pycparser (2.19) pydantic (1.7.2) pygobject (3.28.3) PyNaCl (1.4.0) pyOpenSSL (19.1.0) python-dateutil (2.6.1) python-dmidecode (3.12.2) python-linux-procfs (0.6) pytz (2017.2) pyudev (0.21.0) pyvmomi (6.7.3) PyYAML (5.3) requests (2.22.0) rpm (4.14.2) schedutils (0.6) selinux (2.9) setuptools (39.2.0) six (1.13.0) slip (0.6.4) slip.dbus (0.6.4) sos (3.8) SSSDConfig (2.2.3) suds-jurko (0.6) syspurpose (1.26.20) typing-extensions (3.7.4.3) urllib3 (1.25.7) vapi-client-bindings (2.5.0) vapi-common (2.14.0) vapi-common-client (2.14.0) vapi-runtime (2.14.0)
python version:
Python 3.6.8
vSphere version: vCenter 7
Operating System/Shell (used to run SDK-based apps): Linux RHEL 8
Steps or code snippet to reproduce
python3.6 ovf_import_export.py
Actual behavior
Traceback (most recent call last): File "ovf_import_export.py", line 27, in
from com.vmware.content_client import LibraryModel
File "~/.local/lib/python3.6/site-packages/com/vmware/content_client.py", line 32, in
import com.vmware.content.library_client
File "~/.local/lib/python3.6/site-packages/com/vmware/content/library_client.py", line 444, in
'authentication_method': type.OptionalType(type.ReferenceType(sys.modules[name], 'PublishInfo.AuthenticationMethod')),
File "~/.local/lib/python3.6/site-packages/vmware/vapi/bindings/type.py", line 364, in init
raise TypeError('Context name should be a string')
TypeError: Context name should be a string
Expected behavior
the ovf tool program to start
Additional Information
I am installing the sdk offline by copying the zip file and extracting it on a server as the server doesnt have outside internet access