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

Locust stopped working after Flast 2.0 got released #1759

Closed
stanislawskwark opened this issue May 12, 2021 · 1 comment
Closed

Locust stopped working after Flast 2.0 got released #1759

stanislawskwark opened this issue May 12, 2021 · 1 comment
Labels

Comments

@stanislawskwark
Copy link
Contributor

in setup.py I can see:
"flask>=1.1.2",
I guess it should be hardcoded to ==1.1.2 for now.

it crashes with:

File "/root/.local/share/virtualenvs/xxxxxxx/lib/python3.6/site-packages/locust/web.py", line 102, in __init__
app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'
@bernicecpz
Copy link

I also faced the same error, I tried to google for a solution.

Based on what chfaber shared in this StackOverflow post , the workaround would be to replace app.jinja_options['extensions'].append('jinja2.ext.do') with app.jinja_env.add_extension('jinja2.ext.do')

However, I am not familiar with how Flask and Jinja work together, so I can't offer much explanation. Hope this still helps!

@cyberw cyberw closed this as completed in 4b114af May 12, 2021
cyberw added a commit that referenced this issue May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants