open-falcon / dashboard

falcon-plus frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

运行时出现错误, '_compile_builder' it contains a nested function with free variables?

songcap opened this issue · comments

CentOS 7.5
错误内容如下:试了很多机子都不行
Traceback (most recent call last):
File "wsgi.py", line 28, in
from rrd import app
File "/dashboard/dashboard/rrd/init.py", line 19, in
from flask import Flask, request
File "/dashboard/dashboard/env/lib/python2.7/site-packages/flask/init.py", line 21, in
from .app import Flask, Request, Response
File "/dashboard/dashboard/env/lib/python2.7/site-packages/flask/app.py", line 23, in
from werkzeug.routing import BuildError, Map, RequestRedirect, Rule
File "/dashboard/dashboard/env/lib/python2.7/site-packages/werkzeug/routing.py", line 948
exec(code, globs, locs)
SyntaxError: unqualified exec is not allowed in function '_compile_builder' it contains a nested function with free variables

这个该如何解决,试了两天没找到解决方法

我也是,这个到底是什么问题啊?费劲死了。对flask真的不了解。

commented

升级Werkzeug版本,修改pip_requirements.txt,Werkzeug版本修为为0.15.4

Werkzeug==0.15.4

之后执行

./env/bin/pip install -r pip_requirements.txt -i https://pypi.douban.com/simple

启动即可