You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the KeyError raises, due to Flask 2.0.x updating.
File "run.py", line 5, in <module>
app = create_app()
File "C:\temp_pjt\main\__init__.py", line 68, in create_app
docs.register_existing_resources()
File "C:\temp\flask_apispec\extension.py", line 107, in register_existing_resources
self.register(rule, blueprint=blueprint_name)
File "C:\temp\flask_apispec\extension.py", line 124, in register
self._defer(self._register, target, endpoint, blueprint,
File "C:\temp\flask_apispec\extension.py", line 72, in _defer
bound()
File "C:\temp\flask_apispec\extension.py", line 140, in _register
paths = self.view_converter.convert(target, endpoint, blueprint)
File "C:\temp\flask_apispec\apidoc.py", line 38, in convert
rules = self.app.url_map._rules_by_endpoint[endpoint]
KeyError: '<lambda>'
In the Flask.__init__ method, 'view_func' of the endpoint 'static' has been changed from self_ref().send_static_file to lambda function.
So, target.__name__.lower()(endpoint) is <lambda>. It doesn't exist in self.app.url_map._rules_by_endpoint as a key.
Please follow up this issue.
The text was updated successfully, but these errors were encountered:
Hi, the KeyError raises, due to Flask 2.0.x updating.
In the
Flask.__init__
method, 'view_func' of the endpoint 'static' has been changed from self_ref().send_static_file to lambda function.So,
target.__name__.lower()
(endpoint) is<lambda>
. It doesn't exist inself.app.url_map._rules_by_endpoint
as a key.Please follow up this issue.
The text was updated successfully, but these errors were encountered: