aio-libs / aiodns

Simple DNS resolver for asyncio
https://pypi.python.org/pypi/aiodns
MIT License
532 stars 69 forks source link

Error when running aiodns #41

Closed DemGiran closed 5 years ago

DemGiran commented 6 years ago

future: <Future finished exception=DNSError(1, 'DNS server returned answer with no data')> aiodns.error.DNSError: (1, 'DNS server returned answer with no data') Future exception was never retrieved

Code is as follows:

import asyncio
import aiodns
from tqdm import tqdm
import time

from src.utils.load import load

loop = asyncio.get_event_loop()
resolver = aiodns.DNSResolver(loop=loop, nameservers=['8.8.8.8'])

bucket = [....]
f = []
for i in tqdm(bucket):
    f = resolver.query(i+'.com','NS')

result = loop.run_until_complete(f)
print(result)
saghul commented 6 years ago

What domain is this failing for? The code looks ok.