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

SQLAlchemy database is locked error #59

Open
djoshea opened this issue Aug 5, 2015 · 1 comment
Open

SQLAlchemy database is locked error #59

djoshea opened this issue Aug 5, 2015 · 1 comment

Comments

@djoshea
Copy link

djoshea commented Aug 5, 2015

Not sure if I have my configuration right, but I'm seeing the stack trace below. Not sure if this is relevant, but I'm on a shared server and have installed everything I needed (including boto and sqlalchemy with pip install --user).

[ djoshea@host ~ ]: glacier vault list
Traceback (most recent call last):
  File "/net/home/djoshea/bin/glacier", line 730, in <module>
    App().main()
  File "/net/home/djoshea/bin/glacier", line 708, in __init__
    cache = Cache(get_connection_account(connection))
  File "/net/home/djoshea/bin/glacier", line 124, in __init__
    self.Base.metadata.create_all(self.engine)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 3687, in create_all
    tables=tables)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1856, in _run_visitor
    conn._run_visitor(visitorcallable, element, **kwargs)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1481, in _run_visitor
    **kwargs).traverse_single(element)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
    return meth(obj, **kw)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 709, in visit_metadata
    [t for t in tables if self._can_create_table(t)])
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 686, in _can_create_table
    table.name, schema=table.schema)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/base.py", line 1127, in has_table
    connection, "table_info", table_name, schema=schema)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/base.py", line 1468, in _get_table_pragma
    cursor = connection.execute(statement)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 906, in execute
    return self._execute_text(object, multiparams, params)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1054, in _execute_text
    statement, parameters
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/net/home/djoshea/.local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'PRAGMA table_info("archive")']

my config looks like this:

[ djoshea@index ~ ]: cat .boto
[Credentials]
aws_access_key_id = ...
aws_secret_access_key = ...

[s3]
calling_format = boto.s3.connection.OrdinaryCallingFormat
host = s3-us-west-1.amazonaws.com
@djoshea
Copy link
Author

djoshea commented Aug 5, 2015

Just to note, from python directly this works:

import boto.glacier
c = boto.glacier.connect_to_region("us-west-1")
c.list_vaults()

Calling glacier as

glacier --region us-west-1 vault list

I still get the database is locked error.

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