I was starting to learn Flask-SQLAlchemy and this was my first project, I was trying to make a blog Application. And I just can't connect this database!
I've tried several ways of connecting using several ways such as wrapping the connections in try: and except: code blocks. and alot of other things but none of theme seems to work.
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:\\\\E:\Blog\database.db'
db = SQLAlchemy(app)
I've this code to connect the database right now, this throws the following error: sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'E:\Blog\database.db'
As far as I can understand the situation I think it is the error of the file path, but no file path seem to work! I've tried using: sqlite:////mnt/e/Blog/database.db From another stackOverflow instance but looks like it was for UNIX. Please help!
E:. Please remove the extra backslash so that is now'sqlite:\\\...'instead of'sqlite:\\\\....