(python) Gaierror: [errno 11004] Getaddrinfo Failed
from Tkinter import * import tkMessageBox, socket root = Tk() root.title('pynet v1.0') root.config(bg='black') root.resizable(0,0) text = Text() text1 = Text() text1.conf
Solution 1:
My guess is because you are using a hostname that has a trailing newline. At the time I write this answer, your code shows:
defInfo():
targetip = socket.gethostbyname_ex(text1.get("1.0", END))
text.insert(END, targetip)
When you use the index END
you get the extra newline that is added by the text widget. You need to strip that off or use the index "end-1c"
.
Post a Comment for "(python) Gaierror: [errno 11004] Getaddrinfo Failed"