from flask import Flask
app = Flask(__name__);
app.run();
运行后会出现
D:\Fuwuqi>demo1.py
Traceback (most recent call last):
File "D:\Fuwuqi\demo1.py", line 23, in
app.run();
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\app.py", l
ine 841, in run
run_simple(host, port, self, **options)
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving
.py", line 739, in run_simple
inner()
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving
.py", line 699, in inner
fd=fd)
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving
.py", line 593, in make_server
passthrough_errors, ssl_context, fd=fd)
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving
.py", line 504, in init
HTTPServer.__init__(self, (host, int(port)), handler)
File "C:\Users\顾准\AppData\Local\Programs\Python\Python36-32\lib\socketserver.py", line 453, in
init