Discuss / Python / 求助windows 10环境, Python代码运行助,learning无法运行,看不懂,Why?

求助windows 10环境, Python代码运行助,learning无法运行,看不懂,Why?

E:\Works>python learning.py

Traceback (most recent call last):

  File "learning.py", line 245, in <module>

    main()

  File "learning.py", line 114, in main

    httpd = HTTPServer(('127.0.0.1', PORT), LearningHTTPRequestHandler)

  File "D:\Programs\Python\Python37\lib\socketserver.py", line 449, in __init__

    self.server_bind()

  File "D:\Programs\Python\Python37\lib\http\server.py", line 139, in server_bind

    self.server_name = socket.getfqdn(host)

  File "D:\Programs\Python\Python37\lib\socket.py", line 676, in getfqdn

    hostname, aliases, ipaddrs = gethostbyaddr(name)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 8: invalid start byte


  • 1

Reply