Issue deploying Flask app

I am trying to deploy my Flask app to render and it seems to have an issue with flask_security, more specifically the line “app.security = Security(app, user_datastore)”.

This gives the error message “AttributeError: ‘Flask’ object has no attribute ‘before_first_request’. Did you mean: ‘_got_first_request’?”

My app runs fine locally, I only get this error in render. I am using python version 3.11.0, flask version 2.3.2, flask_security version 3.0.0, and Flask_Security_Too version 5.2.0

Hi,

I’ve replied to the ticket you also opened, it looks like you were able to resolve your issue. Maybe you could share the solution with the community in case anyone else has the same?

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.