web connection with python
python, web.py
Solution
The error message says that it couldn't create a listening socket on the specified port. Check if there is already a server running on port 8081.
Problem
I have this code to create a webapp in my server: ``` import web urls = ( '/update', 'Update', ) app = web.application(urls, globals()) class Update: print "hola" if __name__=='__main__': app.run() ``` When I try to execute: ``` python@ubuntu:~$ python prueba.py 8081 hola http://0.0.0.0:8081/ Traceback (most recent call last): File "prueba.py", line 21, in <module> app.run() File "/usr/local/lib/python2.6/dist-packages/web/application.py", line 311, in run return wsgi.runwsgi(self.wsgifunc(*middleware)) File "/usr/local/lib/python2.6/dist-packages/web/wsgi.py", line 54, in runwsgi return httpserver.runsimple(func, validip(listget(sys.argv, 1, ''))) File "/usr/local/lib/python2.6/dist-packages/web/httpserver.py", line 148, in runsimple server.start() File "/usr/local/lib/python2.6/dist-packages/web/wsgiserver/__init__.py", line 1753, in start raise socket.error(msg) socket.error: No socket could be created ``` Why is it happening? Thank you in advance