码迷,mamicode.com
首页 > Web开发 > 详细

web.py端口被占用的错误

时间:2017-10-04 14:07:48      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:__init__   app   traceback   tps   return   文件   /usr   error:   运行   

运行文件Python code.py

文件里用到import web出现

Traceback (most recent call last):
File "code.py", line 14, in <module>
app.run()
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 313, in run
return wsgi.runwsgi(self.wsgifunc(*middleware))
File "/usr/local/lib/python2.7/dist-packages/web/wsgi.py", line 54, in runwsgi
return httpserver.runsimple(func, validip(listget(sys.argv, 1, ‘‘)))
File "/usr/local/lib/python2.7/dist-packages/web/httpserver.py", line 157, in runsimple
server.start()
File "/usr/local/lib/python2.7/dist-packages/web/wsgiserver/__init__.py", line 1753, in start
raise socket.error(msg)
socket.error: No socket could be created

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

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

web.py端口被占用的错误

标签:__init__   app   traceback   tps   return   文件   /usr   error:   运行   

原文地址:http://www.cnblogs.com/creativepower/p/7625427.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!