../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e00355f8>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e00355f8>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e00356a0>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_list_me_thoughts>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e03e8f60>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e00356a0>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
________________________________________________________________________________________________ ERROR at setup of test_list_me_unauthorized ________________________________________________________________________________________________
self = Engine(sqlite+pysqlite:////opt/code/thoughts_backend/../db.sqlite3), fn = <bound method Pool.connect of <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>>, connection = None
def _wrap_pool_connect(self, fn, connection):
dialect = self.dialect
try:
> return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>
def connect(self):
"""Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.
"""
if not self._use_threadlocal:
> return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>, threadconns = None, fairy = None
@classmethod
def _checkout(cls, pool, threadconns=None, fairy=None):
if not fairy:
> fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>
@classmethod
def checkout(cls, pool):
> rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>
def _do_get(self):
> return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>
def _create_connection(self):
"""Called by subclasses to create a new ConnectionRecord."""
> return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e028a400>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e028a6a0>, connect = True
def __init__(self, pool, connect=True):
self.__pool = pool
if connect:
> self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e028a400>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e028a400>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e028a550>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_list_me_unauthorized>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e024dc88>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e028a550>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
___________________________________________________________________________________________________ ERROR at setup of test_list_thoughts ____________________________________________________________________________________________________
self = Engine(sqlite+pysqlite:////opt/code/thoughts_backend/../db.sqlite3), fn = <bound method Pool.connect of <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>>, connection = None
def _wrap_pool_connect(self, fn, connection):
dialect = self.dialect
try:
> return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>
def connect(self):
"""Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.
"""
if not self._use_threadlocal:
> return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>, threadconns = None, fairy = None
@classmethod
def _checkout(cls, pool, threadconns=None, fairy=None):
if not fairy:
> fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>
@classmethod
def checkout(cls, pool):
> rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>
def _do_get(self):
> return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>
def _create_connection(self):
"""Called by subclasses to create a new ConnectionRecord."""
> return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e03dcb00>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e03dc208>, connect = True
def __init__(self, pool, connect=True):
self.__pool = pool
if connect:
> self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e03dcb00>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e03dcb00>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e03dc080>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_list_thoughts>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e02a1978>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e03dc080>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
________________________________________________________________________________________________ ERROR at setup of test_list_thoughts_search ________________________________________________________________________________________________
self = Engine(sqlite+pysqlite:////opt/code/thoughts_backend/../db.sqlite3), fn = <bound method Pool.connect of <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>>, connection = None
def _wrap_pool_connect(self, fn, connection):
dialect = self.dialect
try:
> return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>
def connect(self):
"""Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.
"""
if not self._use_threadlocal:
> return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>, threadconns = None, fairy = None
@classmethod
def _checkout(cls, pool, threadconns=None, fairy=None):
if not fairy:
> fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>
@classmethod
def checkout(cls, pool):
> rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>
def _do_get(self):
> return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>
def _create_connection(self):
"""Called by subclasses to create a new ConnectionRecord."""
> return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0205d30>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0205f98>, connect = True
def __init__(self, pool, connect=True):
self.__pool = pool
if connect:
> self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0205d30>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0205d30>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e0205dd8>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_list_thoughts_search>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e02614e0>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e0205dd8>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
____________________________________________________________________________________________________ ERROR at setup of test_get_thought _____________________________________________________________________________________________________
self = Engine(sqlite+pysqlite:////opt/code/thoughts_backend/../db.sqlite3), fn = <bound method Pool.connect of <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>>, connection = None
def _wrap_pool_connect(self, fn, connection):
dialect = self.dialect
try:
> return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>
def connect(self):
"""Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.
"""
if not self._use_threadlocal:
> return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>, threadconns = None, fairy = None
@classmethod
def _checkout(cls, pool, threadconns=None, fairy=None):
if not fairy:
> fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>
@classmethod
def checkout(cls, pool):
> rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>
def _do_get(self):
> return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>
def _create_connection(self):
"""Called by subclasses to create a new ConnectionRecord."""
> return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0251a90>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89e0251f98>, connect = True
def __init__(self, pool, connect=True):
self.__pool = pool
if connect:
> self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0251a90>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89e0251a90>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e0251b38>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_get_thought>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e03a5320>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89e0251b38>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
______________________________________________________________________________________________ ERROR at setup of test_get_non_existing_thought ______________________________________________________________________________________________
self = Engine(sqlite+pysqlite:////opt/code/thoughts_backend/../db.sqlite3), fn = <bound method Pool.connect of <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>>, connection = None
def _wrap_pool_connect(self, fn, connection):
dialect = self.dialect
try:
> return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>
def connect(self):
"""Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.
"""
if not self._use_threadlocal:
> return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>, threadconns = None, fairy = None
@classmethod
def _checkout(cls, pool, threadconns=None, fairy=None):
if not fairy:
> fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>
@classmethod
def checkout(cls, pool):
> rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>
def _do_get(self):
> return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>
def _create_connection(self):
"""Called by subclasses to create a new ConnectionRecord."""
> return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89dff00710>, pool = <sqlalchemy.pool.impl.NullPool object at 0x7f89dff00c18>, connect = True
def __init__(self, pool, connect=True):
self.__pool = pool
if connect:
> self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89dff00710>, first_connect_check = True
def __connect(self, first_connect_check=False):
pool = self.__pool
# ensure any existing connection is removed, so that if
# creator fails, this attribute stays None
self.connection = None
try:
self.starttime = time.time()
> connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f89dff00710>
def connect(connection_record=None):
if dialect._has_events:
for fn in dialect.dispatch.do_connect:
connection = fn(
dialect, connection_record, cargs, cparams
)
if connection is not None:
return connection
> return dialect.connect(*cargs, **cparams)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89dff007b8>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlite3.OperationalError: unable to open database file
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
The above exception was the direct cause of the following exception:
request = <SubRequest '_configure_application' for <Function test_get_non_existing_thought>>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f89e0334860>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
> app = getfixturevalue(request, 'app')
../venv/lib/python3.6/site-packages/pytest_flask/plugin.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib/python3.6/site-packages/pytest_flask/pytest_compat.py:3: in getfixturevalue
return request.getfixturevalue(value)
tests/conftest.py:16: in app
application.db.create_all()
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:963: in create_all
self._execute_for_all_tables(app, bind, 'create_all')
../venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:955: in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
../venv/lib/python3.6/site-packages/sqlalchemy/sql/schema.py:4316: in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2048: in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2040: in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2242: in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2280: in _wrap_pool_connect
e, dialect, self
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:1547: in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:398: in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
../venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py:152: in reraise
raise value.with_traceback(tb)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py:2276: in _wrap_pool_connect
return fn()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:363: in connect
return _ConnectionFairy._checkout(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:773: in _checkout
fairy = _ConnectionRecord.checkout(pool)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:492: in checkout
rec = pool._do_get()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/impl.py:238: in _do_get
return self._create_connection()
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:308: in _create_connection
return _ConnectionRecord(self)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:437: in __init__
self.__connect(first_connect_check=True)
../venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py:652: in __connect
connection = pool._invoke_creator(self)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py:114: in connect
return dialect.connect(*cargs, **cparams)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f89dff007b8>, cargs = ('/opt/code/db.sqlite3',), cparams = {}
def connect(self, *cargs, **cparams):
> return self.dbapi.connect(*cargs, **cparams)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
E (Background on this error at: http://sqlalche.me/e/e3q8)
../venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py:489: OperationalError
================================================================================================= 9 passed, 24 warnings, 8 errors in 5.89s ==================================================================================================