首页 > 解决方案 > Flask AttributeError:“str”对象没有属性“wrap_socket”

问题描述

当我运行我的烧瓶微服务时,我得到如下所示的错误:“AttributeError:'str'对象没有属性'wrap_socket'”

当我安装 pyopenssl 时出现此错误

app = Flask(__name__)

@app.route('/', methods=['POST', 'GET'])
def main_page():
    return render_template('sign.html')

if __name__ == '__main__':
    app.run(port=5000 ,host="localhost", ssl_context='', debug=True)

标签: pythonflaskopenssl

解决方案


推荐阅读