当前位置:   article > 正文

【Python错误】AttributeError: 'bool' object has no attribute '__call__'_attributeerror: 'bool' object has no attribute 'cu

attributeerror: 'bool' object has no attribute 'cursor

使用flask布置web时,current_user.is_authenticated()出现错误:

        AttributeError: 'bool' object has no attribute '__call__'

解决方法:

        flask-login的版本问题,flask-login2.x是current_user.is_authenticated(),flask-login3.x是current_user.is_authenticated。避免这个问题最好的办法就是使用虚拟环境并在requirement中写明版本号。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/901904
推荐阅读
相关标签
  

闽ICP备14008679号