Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Py36: sqlite3: cannot change into wal mode from within a transaction #88

Open
MarSoft opened this issue Mar 3, 2017 · 0 comments

Comments

@MarSoft
Copy link

MarSoft commented Mar 3, 2017

I am using Python 3.6. When I try to launch bedup (on clean installation), I am getting this error - see traceback attached below.
According to discussion on yadayada/acd_cli#509, this issue is related to py3.6.

$ bedup scan
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2138, in _wrap_pool_connect
    return fn()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 328, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 516, in checkout
    rec = pool._do_get()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 1045, in _do_get
    c = self._create_connection()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 663, in __connect
    pool.dispatch.connect(self.connection, self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
    fn(*args, **kw)
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 88, in sql_setup
    cur.execute('PRAGMA journal_mode = WAL')
sqlite3.OperationalError: cannot change into wal mode from within a transaction

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/bedup", line 11, in <module>
    load_entry_point('bedup==0.10.1', 'console_scripts', 'bedup')()
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 497, in script_main
    sys.exit(main(sys.argv))
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 486, in main
    return args.action(args)
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 122, in vol_cmd
    sess = get_session(args)
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 103, in get_session
    upgrade_schema(engine)
  File "/usr/lib/python3.6/site-packages/bedup/migrations.py", line 38, in upgrade_schema
    context = MigrationContext.configure(engine.connect())
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2082, in connect
    return self._connection_cls(self, **kwargs)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 90, in __init__
    if connection is not None else engine.raw_connection()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2168, in raw_connection
    self.pool.unique_connection, _connection)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2142, in _wrap_pool_connect
    e, dialect, self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1456, in _handle_dbapi_exception_noconnection
    exc_info
  File "/usr/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2138, in _wrap_pool_connect
    return fn()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 328, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 516, in checkout
    rec = pool._do_get()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 1045, in _do_get
    c = self._create_connection()
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/pool.py", line 663, in __connect
    pool.dispatch.connect(self.connection, self)
  File "/usr/lib/python3.6/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
    fn(*args, **kw)
  File "/usr/lib/python3.6/site-packages/bedup/__main__.py", line 88, in sql_setup
    cur.execute('PRAGMA journal_mode = WAL')
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot change into wal mode from within a transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant