BrianB
BrianB

Reputation: 11

'dns.rdtypes.*' and 'dns.rdtypes.ANY.*' hook not found when using pyinstaller + dnspython

I am using Python 3.4, PyInstaller (3.0) and dnspython3 (1.12.0). My script runs fine

from dns import resolver,reversename

try:
    host_IP = resolver.query('www.google.ca', 'A')
    print(host_IP[0])
except:
    print('Not found !!')

try:    
    addr = reversename.from_address('8.8.8.8')
    host_name = resolver.query(addr,"PTR")[0].to_text()
    print(host_name)
except:
    print('Not found !!')

It returns

74.125.225.31
google-public-dns-a.google.com.

When I compiled the script, I got the warning

... 
5350 INFO: Processing hook   hook-dns.rdata.py   
5366 WARNING: Hidden import 'dns.rdtypes.*' not found (probably old hook)
5366 WARNING: Hidden import 'dns.rdtypes.ANY.*' not found (probably old hook)
...

Running the .exe file, it returns

\# 4 4a7de117
\# 32 13676f6f676c652d7075626c69632d64 6e732d6106676f6f676c6503636f6d00

Does anyone know how to fix this? I have tried to include these in my script but it does not help either:

from dns.rdtypes import *
from dns.rdtypes.ANY import *

I am a rookie! Thank you.

Upvotes: 1

Views: 374

Answers (0)

Related Questions