Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Request" object has no attribute "is_xhr" #3869

Closed
wangkai19961223 opened this issue Jan 12, 2021 · 1 comment
Closed

"Request" object has no attribute "is_xhr" #3869

wangkai19961223 opened this issue Jan 12, 2021 · 1 comment

Comments

@wangkai19961223
Copy link

wangkai19961223 commented Jan 12, 2021

It seems "Request" object has no attribute "is_xhr" ,Getting warnings here... How do we fix this?
6f2ab2c357e4a36213b6ad42b7d9669

@greyli
Copy link
Member

greyli commented Jan 12, 2021

Duplicate of #3493. The request.is_xhr property was deprecated since Werkzeug 0.13 and removed in Werkzeug 1.0.0. You will get this error when using Flask <= 0.12.4 and Werkzeug >=1.0.0 because Flask uses this property in the source before the 1.0.0 version. You can just upgrade Flask to fix this issue:

$ pip install -U flask

Or with Pipenv:

$ pipenv update flask

Otherwise, you can also downgrade Werkzeug to 0.16.1:

$ pip install werkzeug==0.16.1  # pipenv install werkzeug==0.16.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants