We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from website import create_app
app = create_app
if name == 'main': app.run(debug=True)
When I run main.py, I get this error "AttributeError: 'function' object has no attribute 'run'"
The text was updated successfully, but these errors were encountered:
I am facing same problem . have you got solution ?
Sorry, something went wrong.
the create_app is a function and in the if condition it is necessary to mention __name__ == __main__
create_app
__name__ == __main__
the correct code is :
from website import create_app app = create_app() if __name__ == '__main__' : app.run()
No branches or pull requests
from website import create_app
app = create_app
if name == 'main':
app.run(debug=True)
When I run main.py, I get this error "AttributeError: 'function' object has no attribute 'run'"
The text was updated successfully, but these errors were encountered: