Forums

Error running WSGI application TypeError: 'module' object is not callable

I think this error occurs because I'm using a flask app factory which means my app is basically a folder and it's configured through the app factory (a function in init.py)

I solved the problem by creating a variable called "app" and setting it's value to the return value of the app factory and then just importing the app

Great! Glad you worked it out.

I have the same error message, could you add the code used, many thanks

perhaps show the full stacktrace- we may be able to offer ideas to help you debug from that.

I have the same error I have a file named app.py where my flask application is created and called by app.run() I don't know how to write wsgi.py file in python anywhere to solve this problem

@neginaryapour Take a look at https://help.pythonanywhere.com/pages/Flask