为什么在输入python hello.py之后出现了socket error

来源:2-1 web开发基础

lmm2000

2018-04-01 10:18

http://0.0.0.0:8080/

Traceback (most recent call last):

  File "hello.py", line 15, in <module>

    app.run()

  File "C:\Python27\lib\site-packages\web\application.py", line 313, in run

    return wsgi.runwsgi(self.wsgifunc(*middleware))

  File "C:\Python27\lib\site-packages\web\wsgi.py", line 59, in runwsgi

    return httpserver.runsimple(func, server_addr)

  File "C:\Python27\lib\site-packages\web\httpserver.py", line 157, in runsimple

    server.start()

  File "C:\Python27\lib\site-packages\web\wsgiserver\__init__.py", line 1753, in start

    raise socket.error(msg)

socket.error: No socket could be created


写回答 关注

3回答

  • 慕设计7193474
    2018-07-24 14:37:55

    这种情况是端口被占用,换个端口即可

    python code.py 8181 #指定到8181端口执行

  • FP1995XY
    2018-06-22 15:46:24

    可能是端口被占用

  • qq_丿乱世丶无情_0
    2018-04-07 23:05:41

    尝试关闭防火墙

python-web.py开发入门

web.py开发入门入门教程,讲解一个你最快能学会的web开发的框架

58639 学习 · 106 问题

查看课程

相似问题