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

flask-apispec breaks with recent apispec 5.x and flask 2.x merged in master #225

Open
fmigneault opened this issue Aug 12, 2021 · 1 comment

Comments

@fmigneault
Copy link

Recent updates of core packages seem to break many things.

I receive errors such as follows:

  File "/home/ubuntu/.local/lib/python3.8/site-packages/flask_apispec/extension.py", line 107, in register_existing_resources
    self.register(rule, blueprint=blueprint_name)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/flask_apispec/extension.py", line 124, in register
    self._defer(self._register, target, endpoint, blueprint,
  File "/home/ubuntu/.local/lib/python3.8/site-packages/flask_apispec/extension.py", line 72, in _defer
    bound()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/flask_apispec/extension.py", line 140, in _register
    paths = self.view_converter.convert(target, endpoint, blueprint)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/flask_apispec/apidoc.py", line 38, in convert
    rules = self.app.url_map._rules_by_endpoint[endpoint]
KeyError: '<lambda>'

Pinning with below versions works again:

apispec>=4,<5
flask<2
flask_apispec==0.11
@POD666
Copy link

POD666 commented May 25, 2022

I had to init Flask app with an empty static_folder: Flask(..., static_folder=None)

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

2 participants