No application found. Either work inside a view function or push an application context.

Error solution No application found. Either work inside a view function or push an application context

An error occurs when working with a context: you have defined a context, but it is not visible in functions. In this case, inside the function, use:

For example:

def analyze_brent_oil(self):
with app.app_context():
if selfbrent_oil_current:
t1 = self.__ yesterday()
t2 = self.__ maximum()
t3 = self.__ last_month()

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *