Public bug reported:

pyVmomi is not working with python 3.12 that ships with 24.04.

There is a commit in the official GIT repo to fix this.
https://github.com/vmware/pyvmomi/commit/44d7b9f0c201a92018bac8324542c0adf96aa148

Here is an example of the errors you get when using it:
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: AttributeError: module 'ssl' has no attribute 'wrap_socket'
fatal: [svnipap-0009 -> localhost]: FAILED! => {"changed": false, 
"module_stderr": "Traceback (most recent call last):
  File 
\"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\",
 line 107, in <module>
    _ansiballz_main()
  File 
\"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\",
 line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
\"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\",
 line 47, in invoke_module
    
runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_guest_find',
 
init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_guest_find',
 _modlib_path=modlib_path),
  File \"<frozen runpy>\", line 226, in run_module
  File \"<frozen runpy>\", line 98, in _run_module_code
  File \"<frozen runpy>\", line 88, in _run_code
  File 
\"/tmp/ansible_vmware_guest_find_payload_co4dlvzj/ansible_vmware_guest_find_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_find.py\",
 line 74, in <module>
  File 
\"/tmp/ansible_vmware_guest_find_payload_co4dlvzj/ansible_vmware_guest_find_payload.zip/ansible_collections/community/vmware/plugins/module_utils/vmware.py\",
 line 39, in <module>
  File \"/usr/lib/python3/dist-packages/pyVim/connect.py\", line 37, in <module>
    from pyVmomi import vim, vmodl, SoapStubAdapter, SessionOrientedStub
  File \"/usr/lib/python3/dist-packages/pyVmomi/__init__.py\", line 204, in 
<module>
    from pyVmomi.SoapAdapter import SoapStubAdapter, StubAdapterBase, 
SoapCmdStubAdapter, \\
  File \"/usr/lib/python3/dist-packages/pyVmomi/SoapAdapter.py\", line 993, in 
<module>
    _SocketWrapper = ssl.wrap_socket
                     ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}

** Affects: python-pyvmomi (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2065876

Title:
  module 'ssl' has no attribute 'wrap_socket'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-pyvmomi/+bug/2065876/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to