swayf / proxmoxer

python wrapper for Proxmox API v2 (https://pve.proxmox.com/pve-docs/api-viewer/index.html)
MIT License
156 stars 58 forks source link

TypeError: __call__() takes from 1 to 2 positional arguments but 7 were given #62

Open shibumi opened 5 years ago

shibumi commented 5 years ago

I have the following code:

proxmox.get('nodes', node['node'], 'qemu', vm['vmid'], 'config', 'description')                

shouldn't this work? I try to get the information in /nodes/<node>/qemu/<vmid>/config/description, but instead I get this TypeError Exception:

2018-11-23 16:23:44,652 DEBUG:paramiko.transport: [chan 1] EOF sent (1)          
  File "proxmox-dokuwiki-exporter.py", line 36, in <module>                      
    'description')                                                               
TypeError: __call__() takes from 1 to 2 positional arguments but 7 were given    
shibumi commented 5 years ago

I tried to follow your README, where you do something like this: proxmox.get('nodes', node['node'], 'openvz') and there you have more than 2 arguments as well...

It would be really nice if you could setup some documentation for your code that is more than the few examples in your README. Thanks a lot!

shibumi commented 5 years ago

I have tested your README... looks like your examples in the README fail as well with: TypeError: __call__() takes from 1 to 2 positional arguments but 4 were given