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

Current Flask Version Throws Error #26

Open
austincollinpena opened this issue Feb 17, 2020 · 4 comments
Open

Current Flask Version Throws Error #26

austincollinpena opened this issue Feb 17, 2020 · 4 comments

Comments

@austincollinpena
Copy link

When running the application locally, this error is shown:
AttributeError: 'Request' object has no attribute 'is_xhr'
Upgrading flask to version 1.1.1 in your requirements.txt will fix the issue. It is likely related to this issue.

@rinormaloku
Copy link
Owner

Hi Austin,

I just tested this again, with python2 and 3 and it works fine. Do you know what could have been the root cause?

@steverabino
Copy link

Root cause can be found here: https://stackoverflow.com/a/60137731/6046659

The Werkzeug library (dependency from Flask) recently received a major update (0.16.1 --> 1.0.0) and it looks like Flask (<=0.12.4) does not restrict it.

You have 2 options:

  • Stick with your current version of Flask and restrict the Werkzeug version that is fetched explicitly in your application's setup.py or requirements.txt (werkzeug<1.0)

  • Upgrade to a recent version of Flask (>=1.0.0), it seem to be running fine with latest Werkzeug

@gpowers01
Copy link

I ran into this issue tonight - bumped flask to Flask==1.1.1 in the sa-logic/sa/requirements.txt and the service worked.

@dhruvdutt
Copy link

In k8s-mastery/sa-logic/sa/requirements.txt file, change Flask version to 0.12.5 and do python3 -m pip install -r requirements.txt.
Make sure you're using Python version 3. Check by doing python --version or python3 --version.

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

No branches or pull requests

5 participants