Skip to content

dnspython 2.4.2 confusion: resolve() vs. query()  #257

@hkelley

Description

@hkelley

Which version of dnspython is expected? I have python3.8/site-packages (2.4.2) on Ubuntu and I get this error using resolve().

  File "/var/www/MISP/app/files/warninglists/tools/generate-crl-ip-domains.py",      line 53, in get_ips_from_domain
    answers = dns.resolver.resolve(domain, 'A')
AttributeError: module 'dns.resolver' has no attribute 'resolve'

I have to switch back to query() to get answers. The docs for 2.4.2 indicate that either should work so I presume this is a setup issue on my part https://dnspython.readthedocs.io/en/latest/resolver-class.html

https://github.com/MISP/misp-warninglists/blob/e868e50c461b2e57c0c4306bad622bc7f658ce39/tools/generate-crl-ip-domains.py#L53C11-L53C11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions