When I run my Python/Flask script, it throws this error:
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
.
Here is the full stack trace:
C:\flask_codigofacilito>python hola_mundo.py
Traceback (most recent call last):
File "hola_mundo.py", line 5, in <module>
app.run()#star the server in the port 5000
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 841, in run
run_simple(host, port, self, **options)
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 708, in run_simple
inner()
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 670, in inner
fd=fd)
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 564, in make_server
passthrough_errors, ssl_context, fd=fd)
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 476, in __init__
HTTPServer.__init__(self, (host, int(port)), handler)
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 440, in __init__
self.server_bind()
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\http\server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Users\vince\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
What is the issue and what can I do to fix it?
Run on Windows 10
CODE:
from flask import Flask
app = Flask(__name__)#new instance,
app.run()#star the server in the port 5000