Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: could not convert string to float: '7.1-8' #2

Open
technoluc opened this issue Jan 14, 2022 · 1 comment
Open

ValueError: could not convert string to float: '7.1-8' #2

technoluc opened this issue Jan 14, 2022 · 1 comment

Comments

@technoluc
Copy link

Hi! Thanks for your hard work, but unfortunately I can't get it working.

python3 proxmox.py --list --pretty

This is the outcome:

  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 316, in <module>
    main()
  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 301, in main
    data = main_list(options, config_path)
  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 190, in main_list
    qemu_list = proxmox_api.node_qemu(node)
  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 154, in node_qemu
    return self.vms_by_type(node, 'qemu')
  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 148, in vms_by_type
    return ProxmoxVMList(self.get('api2/json/nodes/{0}/{1}'.format(node, type)), self.version().get_version())
  File "/home/aceventura/private/provisioning-proxmox/ansible-proxmox-inventory/proxmox.py", line 65, in get_version
    return float(self['version'])
ValueError: could not convert string to float: '7.1-8'

Am I missing something?

@SalehAlolayan
Copy link

SalehAlolayan commented Jan 21, 2022

dirty work around hardcode your ver in the code

class ProxmoxVersion(dict):
def get_version(self):
return float(x.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants