Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 烧瓶编辑:AttributeError:';令牌流&x27;对象没有属性';下一个';_Python_Flask - Fatal编程技术网

Python 烧瓶编辑:AttributeError:';令牌流&x27;对象没有属性';下一个';

Python 烧瓶编辑:AttributeError:';令牌流&x27;对象没有属性';下一个';,python,flask,Python,Flask,我正在尝试测试flask编辑包() 是否有人可以帮助解决此错误:AttributeError:“TokenStream”对象没有属性“next” @app.route('/') def hello_world(): return render_template('test.html') if __name__ == '__main__': app.run(debug=True) 模板: <!DOCTYPE html> <htm

我正在尝试测试flask编辑包()

是否有人可以帮助解决此错误:AttributeError:“TokenStream”对象没有属性“next”

@app.route('/')
    def hello_world():
        return render_template('test.html')

    if __name__ == '__main__':
        app.run(debug=True)
模板:

<!DOCTYPE html>
<html>
<head>
    <title>Haldane</title>
</head>
<body>

<p>Test</p>

{% editable 'Section name' %}
    Python is a programming language that lets you work quickly and integrate systems more effectively.
{% endeditable %}

</body>
</html>
错误:

File "/anaconda/lib/python3.5/site-packages/flask_edits/editable.py", line 18, in parse
parser.stream.next()
AttributeError: 'TokenStream' object has no attribute 'next'
包括守则在内的要点:

假设Flask Edits希望支持Python 3,这是Flask Edits中的一个bug。它应该使用内置函数来提升迭代器:
next(parser.stream)
。在Python2和Python3之间,迭代器上的方法从
next
更改为
\uuuuuuuuuuuuu
。内置函数同时适用于这两种情况。

假设Flask Edits希望支持Python 3,这是Flask Edits中的一个错误。它应该使用内置函数来提升迭代器:
next(parser.stream)
。在Python2和Python3之间,迭代器上的方法从
next
更改为
\uuuuuuuuuuuuu
。内置函数适用于这两种情况

File "/anaconda/lib/python3.5/site-packages/flask_edits/editable.py", line 18, in parse
parser.stream.next()
AttributeError: 'TokenStream' object has no attribute 'next'