I created two databases using the following code with python+flask+sqlalchemy
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///C:\\Users\\dmac'
app.config['SQLALCHEMY_BINDS'] = {
'user': 'sqlite:///C:\\Users\\dmac\\user.db',
'stock': 'sqlite:///C:\\Users\\dmac\\price.db'
}
db = SQLAlchemy(app)
migrate = Migrate(app, db, render_as_batch = True)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
if __name__ == '__main__':
manager.run()
I run the following script:
python app.py db init--multi
python app.py migrate
I get the following error: sqlalchemy.exc.OperationalError:(sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/e3q8)
I have looked and tried different solutions posted, but I still get the same errors. Any helps would be appreciative. Thanks