hetznercloud/hcloud-python

I get an error when creating server or reqesting any server data, looks like

dartpain opened this issue · 3 comments

Bug Report

Current Behavior

TypeError: __init__() got an unexpected keyword argument 'id'
  File "tasks.py", line 1019, in hetzner_server_create
    response1 = hetzner_connection.servers.create(name_string, server_type=ServerType(name=hetzner_type_server),
  File "hcloud/servers/client.py", line 471, in create
    server=BoundServer(self, response['server']),
  File "hcloud/servers/client.py", line 49, in __init__
    ipv6_network = IPv6Network(**public_net['ipv6'])

If i look at data in the response there is now new field id here:

ipv6: {
blocked: False, 
dns_ptr: [], 
id: 5709028, 
ip: '2a01:4ff:f0:b03::/64'
}

Expected behavior/code
Should create server like it usually does

Environment

  • Python Version: 3.9
  • Hcloud-Python Version: v1.16.0

Hey @dartpain,

please make sure to use the last hcloud python release. The stacktrace you show is not the one from hcloud-python 1.16.0.

Same error with same environment (using Ansible on top of hcloud-python).

And as @LKaemmerling said, the error was that Ansible was pointing at the wrong Python env. 🙈

Yeah, I had similar problem all fixed now too...