(Python) gaierror: [Errno 11004] getaddrinfo failed

后端 未结 2 1797
执念已碎
执念已碎 2021-01-28 20:49
from Tkinter import *
import tkMessageBox, socket


root = Tk()
root.title(\"pynet v1.0\")
root.config(bg=\'black\')
root.resizable(0,0)   

text = Text()   
text1 = Tex         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-28 21:28

    Why are you adding CRLF (\r\n) to the hostname before looking it up?

    If removing that doesn't fix it, print out the exact text you're passing to gethostbyname to make sure it's a valid hostname.

提交回复
热议问题