Although sqlite supports multiple concurrent readers, SQLAlchemy tries to write to the locked database:
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/default.py", line 462, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/bedup", line 11, in <module>
sys.exit(script_main())
File "/usr/local/lib/python3.5/dist-packages/bedup/__main__.py", line 497, in script_main
sys.exit(main(sys.argv))
File "/usr/local/lib/python3.5/dist-packages/bedup/__main__.py", line 486, in main
return args.action(args)
File "/usr/local/lib/python3.5/dist-packages/bedup/__main__.py", line 73, in cmd_show_vols
sess = get_session(args)
File "/usr/local/lib/python3.5/dist-packages/bedup/__main__.py", line 103, in get_session
upgrade_schema(engine)
File "/usr/local/lib/python3.5/dist-packages/bedup/migrations.py", line 55, in upgrade_schema
context._version.c.version_num == current_rev))
File "/usr/local/lib/python3.5/dist-packages/alembic/ddl/impl.py", line 118, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
context)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/util/compat.py", line 185, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/default.py", line 462, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked [SQL: 'UPDATE alembic_version SET version_num=? WHERE alembic_version.version_num = ?'] [parameters: (1, 1)]```
Although sqlite supports multiple concurrent readers, SQLAlchemy tries to write to the locked database: