from website import create_app
app = create_app()
if __name__ == '__main__':
app.run(debug=True)
Even though I have installed Module website in vs (pip install website) I get an ImportError that I cannot import ‘create app’ from website
from flask import Flask
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'hfahuhsfuiahdfuhai juueioudiu'
return app
At first I had an ModuleError because I hadn’t a module named ‘website’. Now I have but there’s the ImportError I try asking Chatgpt but it didn’t worked out to me
>Solution :
When you installed the website module, you installed this module, which has the description "HTML to HTML transformer". There is no documentation or a link to the source code which means that we don’t know what you have installed without downloading it ourselves.
If you do not do the following already, I’d recommend you to search for packages on PyPI before installing them so you know what they are and are not cluttering your environment. If you ask ChatGPT for help on software, keep in mind that these models have been (currently) trained with available data, which means that they are primarily able to write code for using popular (Python) packages.
I recommend you to follow a tutorial. If you want to create a Flask app, you can find a comprehensive one here.