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

issubclass() arg 1 must be a class error when trying to retrieve zone #1

Open
Yannik opened this issue Sep 11, 2022 · 0 comments
Open

Comments

@Yannik
Copy link

Yannik commented Sep 11, 2022

Hi Erich,
thank you for creating this role!

Unfortunately, retrieving zones seems to be broken:

>>> from httpnet.client import HttpNetClient
>>> AUTH_TOKEN='my-auth-token'
>>> api = HttpNetClient(auth_token=AUTH_TOKEN)
>>>
>>> api.dns_zone_configs.get("my-zone-id")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/dns.py", line 106, in get
    return next(self.find(ZoneConfigId=key))
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 259, in find
    element = self._element_class.from_json(json_element)
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 140, in from_json
    fields[field] = _from_json_value(value, field_type)
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 88, in _from_json_value
    if issubclass(type_, Element):
TypeError: issubclass() arg 1 must be a class
>>>
>>> list(api.dns_zones.find())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 259, in find
    element = self._element_class.from_json(json_element)
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 140, in from_json
    fields[field] = _from_json_value(value, field_type)
  File "/home/yannik/.local/lib/python3.10/site-packages/httpnet/_core.py", line 88, in _from_json_value
    if issubclass(type_, Element):
TypeError: issubclass() arg 1 must be a class

It would be great if you could have a look at this :-)

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

1 participant