# 源代码:
import smtplib
qqmail = smtplib.SMTP()
qqmail.connect('smtp.qq.com',465)
# 报错内容
Traceback (most recent call last):
File "c:/Users/xxx/Desktop/abc/smtplib模块.py", line 3, in <module>
qqmail = smtplib.SMTP()
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\smtplib.py", line 263, in __init__
fqdn = socket.getfqdn() # return name
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\socket.py", line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 2: invalid start byte