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
Download requests fail with HTTP 500 responses after upgrading to Flask >= 2.3.0. The traceback is:
[ERROR] AttributeError: 'Flask' object has no attribute 'before_first_request'
Traceback (most recent call last):
File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/var/task/door/__init__.py", line 5, in <module>
from door import routes # noqa Has to be at end of file or will cause circular import
File "/var/task/door/routes.py", line 28, in <module>
@app.before_first_request
Download requests fail with HTTP 500 responses after upgrading to Flask >= 2.3.0. The traceback is:
app.before_first_request
was deprecated in Flask 2.2.0 and removed in Flask 2.3.0.Our app uses
before_first_request
at https://github.com/asfadmin/grfn-distribution/blob/test/door/src/door/routes.py#L28 to fetch a private key from secrets manager once when the app is initialized. We'll need to refactor where that initialization is done, or pursue #204 which eliminates the need for the private key.The text was updated successfully, but these errors were encountered: