What causes Python socket error?

前端 未结 4 706
予麋鹿
予麋鹿 2020-12-29 09:57
  File \"C:\\Python25\\lib\\SocketServer.py\", line 330, in __init__
    self.server_bind()
  File \"C:\\Python25\\lib\\BaseHTTPServer.py\", line 101, in server_bind         


        
相关标签:
4条回答
  • 2020-12-29 10:27

    I am assuming your are using the default port assigned by gae sdk so you might want to ensure that it is not used by any other programs.

    0 讨论(0)
  • 2020-12-29 10:29

    It might be possible that you are trying to run on a port the current user account does not have permission to bind to. This could be port 80 or something. Try increasing the portnumber or use a user with sufficient privileges.

    Hope this helps

    0 讨论(0)
  • 2020-12-29 10:35

    run it as follow. This should work

    python -m 8888
    

    if this does not work. Try other numbers like 8080.

    0 讨论(0)
  • 2020-12-29 10:39

    I wonder why the error is not "Port already in use". I kind of know the answer but I should not need to use SO to know it. :) – Oscar Reyes May 13 at 19:09

    The port is not in use, (in UNIX) you need to be superuser to listen on any port < 1024.

    0 讨论(0)
提交回复
热议问题