When starting the base Flask application, I get this error in the shell and cannot find how to solve it.
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) <br/>
Restarting with stat<br/>
Debugger is active!<br/>
Debugger pin code: 295-257-376<br/>
Exception in thread Thread-1:<br/>
Traceback (most recent call last):<br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\threading.py", line 923, in _bootstrap_inner
self.run()<br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\threading.py", line 871, in run
self._target(*self._args, **self._kwargs) <br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 656, in inner
fd=fd)<br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 550, in make_server
passthrough_errors, ssl_context, fd=fd)<br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packages\werkzeug\serving.py", line 462, in __init__
socket.SOCK_STREAM)<br/>
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 446, in fromfd
nfd = dup(fd)<br/>
OSError: [WinError 10038] An operation was attempted on something that is not a socket
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def main():
return render_template('main.html')
app.run(debug=True)
source
share