[GH-ISSUE #198] Throws error when used under Python3.13.x #111

Open
opened 2026-02-27 15:46:30 +03:00 by kerem · 1 comment
Owner

Originally created by @cloudcodger on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/198

Originally assigned to: @jhollowe on GitHub.

I have an Ansible playbook that use a Role that uses modules based off the community.general proxmox module, except that they use the openssh backend. This works fine with Python 3.12.x but now fails with Python 3.13.x with the error Chosen backend requires 'openssh_wrapper' module.

This message is coming from proxmoxer when it checks to see if the openssh_wrapper module is installed and for some reason it fails even when the module is there.

Example of the playbook running:

(venv129) cloudcodger/showcase % python3 --version
Python 3.12.9
(venv129) cloudcodger/showcase % ansible-playbook test_pve.yml

PLAY [Configure the Proxmox Datacenter.] ***************************************************************************************************

TASK [Test calling openssh module.] ********************************************************************************************************
ok: [localhost]

PLAY RECAP *********************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Example of the playbook run with the error:

(venv132) cloudcodger/showcase % python3 --version
Python 3.13.2
(venv132) cloudcodger/showcase % ansible-playbook test_pve.yml

PLAY [Configure the Proxmox Datacenter.] ***************************************************************************************************

TASK [Test calling openssh module.] ********************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Chosen backend requires 'openssh_wrapper' module\n\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *********************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

In both cases, using proxmoxer module version 2.2.0.

Here is the test_pve.yml playbook that is failing with Python 3.13.

---
- name: Configure the Proxmox Datacenter.
  gather_facts: false
  hosts: localhost

  tasks:
    - name: Test calling openssh module.
      cloudcodger.proxmox_openssh.proxmox_group:
        api_host: gadget1
        api_user: root
        api_port: 22
        api_sudo: false
        group: Admin
        state: present
Originally created by @cloudcodger on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/198 Originally assigned to: @jhollowe on GitHub. I have an Ansible playbook that use a Role that uses modules based off the `community.general` `proxmox` module, except that they use the `openssh` backend. This works fine with Python 3.12.x but now fails with Python 3.13.x with the error `Chosen backend requires 'openssh_wrapper' module`. This message is coming from `proxmoxer` when it checks to see if the `openssh_wrapper` module is installed and for some reason it fails even when the module is there. Example of the playbook running: ``` (venv129) cloudcodger/showcase % python3 --version Python 3.12.9 (venv129) cloudcodger/showcase % ansible-playbook test_pve.yml PLAY [Configure the Proxmox Datacenter.] *************************************************************************************************** TASK [Test calling openssh module.] ******************************************************************************************************** ok: [localhost] PLAY RECAP ********************************************************************************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` Example of the playbook run with the error: ``` (venv132) cloudcodger/showcase % python3 --version Python 3.13.2 (venv132) cloudcodger/showcase % ansible-playbook test_pve.yml PLAY [Configure the Proxmox Datacenter.] *************************************************************************************************** TASK [Test calling openssh module.] ******************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Chosen backend requires 'openssh_wrapper' module\n\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1} PLAY RECAP ********************************************************************************************************************************* localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` In both cases, using `proxmoxer` module version `2.2.0`. Here is the `test_pve.yml` playbook that is failing with Python 3.13. ``` --- - name: Configure the Proxmox Datacenter. gather_facts: false hosts: localhost tasks: - name: Test calling openssh module. cloudcodger.proxmox_openssh.proxmox_group: api_host: gadget1 api_user: root api_port: 22 api_sudo: false group: Admin state: present ```
Author
Owner

@jhollowe commented on GitHub (Feb 18, 2025):

I was working on trying to get py3.13 working, but it looks like 3.13 deprecated something that the openssh-wrapper library was using. Since that library hasn't been updated in many years and has not accepted previous PRs, I just forked it and added a fix for this issue.

Feel free to use git+https://github.com/proxmoxer/openssh-wrapper.git@master in your requirements.txt (or however else you are installing python libraries). I need to reach out to the current maintainers of openssh-wrapper and see if they want to continue owning it or would like this org to take it over.

<!-- gh-comment-id:2667155471 --> @jhollowe commented on GitHub (Feb 18, 2025): I was working on trying to get py3.13 working, but it looks like 3.13 deprecated something that the openssh-wrapper library was using. Since that library hasn't been updated in many years and has not accepted previous PRs, I just forked it and added a fix for this issue. Feel free to use `git+https://github.com/proxmoxer/openssh-wrapper.git@master` in your requirements.txt (or however else you are installing python libraries). I need to reach out to the current maintainers of `openssh-wrapper` and see if they want to continue owning it or would like this org to take it over.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#111
No description provided.