Linux下debug出错

来源:4-6 日志系统

jwk2

2019-04-22

if __name__=="__main__":
    app.run( host="0.0.0.0", debug=True)

(imooc) [root@localhost order]# ls
common Hello.py imooc.py pycache
(imooc) [root@localhost order]# python Hello.py

  • Serving Flask app “Hello” (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    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 37, in
    app.run( host=“0.0.0.0”, debug=True)
    File “/root/imooc/lib/python3.5/site-packages/flask/app.py”, line 943, in run
    run_simple(host, port, self, **options)
    File “/root/imooc/lib/python3.5/site-packages/werkzeug/serving.py”, line 988, 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]#

Linux 下debug出错
求教大神这个如何解决?

写回答

3回答

编程浪子

2019-04-22

你好

我的个人 QQ:1586538192

0
2
jwk2
加您了,麻烦通过下
2019-04-22
共2条回复

编程浪子

2019-04-22

你好,因为 werkzeug 版本太高了

pip uninstall werkzeug  

pip install werkzeug==0.14.1 

3
1
qq_洪伊_0
服务器也遇到这个了,也是0.15.1卸载了,重装这个。但,为什么会出现这个呢?版本太高了,是什么原因呢?
2020-03-11
共1条回复

编程浪子

2019-04-22

你好

建议通过课程群找我的QQ,私聊。最近好像也有一个遇到这个问题

0
2
jwk2
是这个群吗?325264502
2019-04-22
共2条回复

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1889 问题

查看课程