There seems to be a mistake in your code.

Instead of 'app=create_app', it should be 'app=create_app()'.

The 'create_app' function is a factory function that creates and configures the Flask application object. By calling 'create_app()', you actually create the app object and assign it to the 'app' variable.

Here's the corrected code:

from App import create_app

# Call the create_app function to create the app object
app = create_app()

if __name__ == '__main__':
    app.run()

Make sure that the 'create_app' function is correctly implemented in your 'App' module and that all the necessary dependencies are installed.

Flask App 创建错误:`app = create_app()` 应为 `app = create_app()`

原文地址: https://www.cveoy.top/t/topic/kgrX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录