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

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

Topic source

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

SammyH25

#2 Created at ... [Delete] [Delete and Lock User]

我也是这样,请问解决了嘛???

改成英文也没有解决,还是老样子

廖雪峰

#4 Created at ... [Delete] [Delete and Lock User]

重启电脑

重启还是依旧一样错误的提示

我跟你一样的情况

请问解决了吗??我也是一样的情况

七点半la

#8 Created at ... [Delete] [Delete and Lock User]

你们是怎么解决这个问题的?求助


  • 1

Reply