老师这个哪里出问题了,可以给我分析一下吗

来源:4-9 打造高可用flask mvc框架

慕田峪1533028

2019-12-21

C:\Users\dell\PycharmProjects\untitled4>SET ops_config=local && python manager.py runserver
  File "manager.py", line 16
    set Exception as e:
      ^
SyntaxError: invalid syntax

C:\Users\dell\PycharmProjects\untitled4>SET ops_config=local && python manager.py runserver
  File "manager.py", line 16
    export Exception as e:
         ^
SyntaxError: invalid syntax

C:\Users\dell\PycharmProjects\untitled4>set ops_config=local && python manager.py runserver
  File "manager.py", line 16
    set Exception as e:
      ^
SyntaxError: invalid syntax

C:\Users\dell\PycharmProjects\untitled4>set ops_config=local && python manager.py runserver
  File "manager.py", line 16
    SET Exception as e:
      ^
SyntaxError: invalid syntax

C:\Users\dell\PycharmProjects\untitled4>SET ops_config=local && python manager.py runserver
  File "manager.py", line 16
    SET Exception as e:
      ^
SyntaxError: invalid syntax

C:\Users\dell\PycharmProjects\untitled4>

写回答

4回答

编程浪子

2019-12-22

你好

你分开执行命令

set ops_config=local 

enter 回车在执行 

python manager.py runserver

0
0

慕田峪1533028

提问者

2019-12-21

except Exception as e:
        这个报错

0
0

慕田峪1533028

提问者

2019-12-21

# -*- coding: utf-8 -*-
from application import app,manager
from flask_script import Server
import www

##web server
manager.add_command( "runserver", Server( host='0.0.0.0',port=app.config['SERVER_PORT'],use_debugger = True ,use_reloader = True) )

def main():
    manager.run( )

if __name__ == '__main__':
    try:
        import sys
        sys.exit( main() )
    except Exception as e:
        import traceback
        traceback.print_exc()

0
0

编程浪子

2019-12-21

你好

你讲你 manager.py 代码贴出来,特别看看第16行报错是什么

0
1
慕田峪1533028
您好老师,我这个问题怎么解决呀,?
2019-12-21
共1条回复

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

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

1709 学习 · 1889 问题

查看课程