(imooc) [root@localhost order]# python Hello.py
* Serving Flask app "Hello" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
Traceback (most recent call last):
File "Hello.py", line 39, in <module>
app.run(host='0.0.0.0', port=5000, debug=True)
File "/root/imooc/lib/python3.5/site-packages/flask/app.py", line 944, in run
run_simple(host, port, self, **options)
File "/root/imooc/lib/python3.5/site-packages/werkzeug/serving.py", line 1007, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
File "/root/imooc/lib/python3.5/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
File "/root/imooc/lib/python3.5/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
exit_code = subprocess.call(args, env=new_environ, close_fds=False)
File "/usr/local/python3/lib/python3.5/subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/python3/lib/python3.5/subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "/usr/local/python3/lib/python3.5/subprocess.py", line 1540, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
(imooc) [root@localhost order]# pip uninstall werkzeug
Uninstalling Werkzeug-0.15.4:
Would remove:
/root/imooc/lib/python3.5/site-packages/Werkzeug-0.15.4.dist-info/*
/root/imooc/lib/python3.5/site-packages/werkzeug/*
Proceed (y/n)? y
Successfully uninstalled Werkzeug-0.15.4
(imooc) [root@localhost order]# pip install werkzeug==0.14.1
Collecting werkzeug==0.14.1
Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
|████████████████████████████████| 327kB 25kB/s
Installing collected packages: werkzeug
Successfully installed werkzeug-0.14.1
(imooc) [root@localhost order]# python Hello.py
* Serving Flask app "Hello" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 130-122-435
[2019-06-08 11:43:53,370] ERROR in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
[2019-06-08 11:43:53,370] INFO in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
[2019-06-08 11:43:53,370] DEBUG in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
192.168.1.102 - - [08/Jun/2019 11:43:53] "GET / HTTP/1.1" 200 -
* Detected change in '/home/www/order/Hello.py', reloading
* Restarting with stat
* Debugger is active!
* Debugger PIN: 130-122-435