SystemError resolving TXT record
pin3da opened this issue · 11 comments
Hello, I was resolving DNS records for some domains and I found an unexpected error resolving the TXT
record of like.com.sa
Here is a code to reproduce the error
import asyncio
import aiodns
loop = asyncio.get_event_loop()
resolver = aiodns.DNSResolver(loop=loop)
result = loop.run_until_complete(resolver.query('like.com.sa', 'TXT'))
print(result)
Thanks
What error do you get?
Exception ignored in: functools.partial(<function DNSResolver._callback at 0x7fc615986950>, <Future pending cb=[_run_until_complete_cb() at /usr/local/lib/python3.6/asyncio/base_events.py:176]>)
Traceback (most recent call last):
File "/home/pin3da/py-envs/py36-discovery/lib/python3.6/site-packages/aiodns/__init__.py", line 56, in _callback
if fut.cancelled():
SystemError: <built-in method cancelled of _asyncio.Future object at 0x7fc615ebbcf8> returned a result with an error set
Hi there! I could reproduce it. It seems to only happen with that domain, as tests pass. I'll take a look as soon as I can!
I think the problem is in pycares.
I found another domain which causes the same problem (maybe helps to see what happens):
wide.com.es
Thanks!
This should fix it: saghul/pycares#57
Tests pass, this will be part of the next pycares release. You can alternatively install pycares from master in the meantime. Cheers!
It's working now, thank you very much !
Hi, I have the exact problem just with another domain and MX:
import asyncio
import aiodns
loop = asyncio.get_event_loop()
resolver = aiodns.DNSResolver(loop=loop)
result = loop.run_until_complete(resolver.query('xn--cardeosapeluqueros-r0b.com', 'MX'))
print(result)
I get
Exception ignored in: functools.partial(<function DNSResolver._callback at 0x7fc89b406ea0>, <Future pending cb=[_run_until_complete_cb() at /usr/local/lib/python3.6/asyncio/base_events.py:176]>) Traceback (most recent call last): File "/home/steven/Envs/vPandapipe/lib/python3.6/site-packages/aiodns/__init__.py", line 56, in _callback if fut.cancelled(): SystemError: <built-in method cancelled of _asyncio.Future object at 0x7fc89bb3b828> returned a result with an error set
I'm using aiodns 1.1.1 and pycares 2.3.0. Should I create a new issue?
Doing a ns lookup I found this for MX:
Non-authoritative answer: xn--cardeosapeluqueros-r0b.com mail exchanger = 10 carde\241osapeluqueros.com.
Maybe it's the special character "\241"?
Found another case with SOA for ayesas.com. Its record also contains a special character:
ayesas.com
origin = ns2.3c1b.com
mail addr = adm\253n.domain.com
serial = 2015010244
refresh = 3600
retry = 600
expire = 1209600
minimum = 3600
I think the origin of the problem is different so I'm creating a new issue.