Issue #272: gearbox setup-db failed (conservancy/kallithea)
tonich_sh
issues-reply at bitbucket.org
Thu Apr 13 11:32:40 UTC 2017
New issue 272: gearbox setup-db failed
https://bitbucket.org/conservancy/kallithea/issues/272/gearbox-setup-db-failed
tonich_sh:
gearbox setup-db -c development.ini --user=admin --password=qwerty --repo=/tmp
```
#!
2017-04-13 14:30:23.672 DEBUG [tg.configuration.app_config] Initializing configuration, package: 'kallithea'
2017-04-13 14:30:23.673 DEBUG [tg.configuration.milestones] config_ready milestone reached
2017-04-13 14:30:23.674 DEBUG [tg.configuration.hooks] Registering <function setup_application at 0x7f2e81b7e9b0> for application wide hook before_config
2017-04-13 14:30:23.674 DEBUG [tg.configuration.hooks] Registering <function setup_configuration at 0x7f2e81b7e668> for application wide hook configure_new_app
2017-04-13 14:30:23.682 DEBUG [tg.configuration.milestones] renderers_ready milestone reached
2017-04-13 14:30:23.689 INFO [kallithea.model.base] initializing db for sqlite:////mnt/src/kallithea/kallithea.db?timeout=60
2017-04-13 14:30:23.690 DEBUG [tg.configuration.milestones] environment_loaded milestone reached
2017-04-13 14:30:23.690 DEBUG [tg.appwrappers.i18n] i18n enabled: True -> {'lang': None, 'no_session_touch': False, 'lang_session_key': 'tg_lang', 'enabled': True}
2017-04-13 14:30:23.690 DEBUG [tg.appwrappers.identity] Identity enabled: False -> {'allow_missing_user': True, 'enabled': True, 'authmetadata': None}
2017-04-13 14:30:23.691 DEBUG [tg.appwrappers.session] Sessions enabled: True -> {'secret': 'development-not-secret', 'invalidate_corrupt': True, 'data_dir': '/mnt/src/kallithea/data/sessions', 'key': 'kallithea', 'timeout': 2592000, 'data_serializer': 'json', 'log_file': None, 'type': None, 'httponly': True}
2017-04-13 14:30:23.692 DEBUG [tg.appwrappers.caching] Caching enabled: True -> {'data_dir': '/mnt/src/kallithea/data/cache/data', 'cache_regions': {'long_term': {'expire': 36000, 'data_dir': '/mnt/src/kallithea/data/cache/data', 'type': 'memory', 'enabled': True, 'lock_dir': '/mnt/src/kallithea/data/cache/lock', 'key_length': 256}, 'sql_cache_short': {'expire': 10, 'data_dir': '/mnt/src/kallithea/data/cache/data', 'type': 'memory', 'enabled': True, 'lock_dir': '/mnt/src/kallithea/data/cache/lock', 'key_length': 256}, 'short_term': {'expire': 60, 'data_dir': '/mnt/src/kallithea/data/cache/data', 'type': 'memory', 'enabled': True, 'lock_dir': '/mnt/src/kallithea/data/cache/lock', 'key_length': 256}}, 'expire': None, 'log_file': None, 'type': 'memory', 'lock_dir': '/mnt/src/kallithea/data/cache/lock'}
2017-04-13 14:30:23.692 DEBUG [tg.appwrappers.mingflush] MingSessionFlush enabled: False -> {'autoflush': False}
2017-04-13 14:30:23.693 DEBUG [tg.appwrappers.transaction_manager] TransactionManager enabled: False -> {'attempts': 1, 'enabled': False, 'commit_veto': None}
2017-04-13 14:30:23.693 DEBUG [tg.appwrappers.errorpage] ErrorPageApplicationWrapper enabled: True -> {'content_types': ['text/html', None], 'handle_exceptions': False, 'path': '/error/document', 'status_codes': [400, 401, 403, 404], 'enabled': True}
2017-04-13 14:30:23.702 INFO [kallithea.lib.auth] getting information about all available permissions
2017-04-13 14:30:23.849 INFO [sqlalchemy.engine.base.Engine]
SELECT
CAST('test plain returns' AS VARCHAR(60)) AS anon_1
2017-04-13 14:30:23.851 INFO [sqlalchemy.engine.base.Engine] ()
2017-04-13 14:30:23.852 INFO [sqlalchemy.engine.base.Engine]
SELECT
CAST('test unicode returns' AS VARCHAR(60)) AS anon_1
2017-04-13 14:30:23.853 INFO [sqlalchemy.engine.base.Engine] ()
2017-04-13 14:30:23.854 INFO [sqlalchemy.engine.base.Engine] BEGIN (implicit)
2017-04-13 14:30:23.855 INFO [sqlalchemy.engine.base.Engine]
SELECT
permissions.permission_id AS permissions_permission_id,
permissions.permission_name AS permissions_permission_name
FROM permissions
2017-04-13 14:30:23.857 INFO [sqlalchemy.engine.base.Engine] ()
2017-04-13 14:30:23.859 INFO [sqlalchemy.engine.base.Engine] ROLLBACK
2017-04-13 14:30:23.860 ERROR [gearbox] (sqlite3.OperationalError) no such table: permissions [SQL: u'SELECT permissions.permission_id AS permissions_permission_id, permissions.permission_name AS permissions_permission_name \nFROM permissions']
Traceback (most recent call last):
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/gearbox/main.py", line 167, in _run_subcommand
return cmd.run(parsed_args)
File "/mnt/src/kallithea/kallithea/lib/paster_commands/common.py", line 65, in run
self._bootstrap_config(args.config_file)
File "/mnt/src/kallithea/kallithea/lib/paster_commands/common.py", line 90, in _bootstrap_config
make_app(conf.global_conf, **conf.local_conf)
File "/mnt/src/kallithea/kallithea/config/middleware.py", line 46, in make_app
app = make_base_app(global_conf, full_stack=full_stack, **app_conf)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/tg/configuration/app_config.py", line 1240, in make_base_app
tg.hooks.notify('configure_new_app', args=(app,))
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/tg/configuration/hooks.py", line 109, in notify
self._call_handler(hook_name, trap_exceptions, func, args, kwargs)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/tg/configuration/hooks.py", line 33, in _call_handler
return func(*args, **kwargs)
File "/mnt/src/kallithea/kallithea/config/app_cfg.py", line 142, in setup_configuration
set_available_permissions(config)
File "/mnt/src/kallithea/kallithea/lib/auth.py", line 728, in set_available_permissions
all_perms = sa.query(Permission).all()
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2613, in all
return list(self)
File "/mnt/src/kallithea/kallithea/lib/caching_query.py", line 81, in __iter__
return Query.__iter__(self)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
return self._execute_and_instances(context)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/opt/git/.virtualenvs/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table: permissions [SQL: u'SELECT permissions.permission_id AS permissions_permission_id, permissions.permission_name AS permissions_permission_name \nFROM permissions']
```
More information about the kallithea-general
mailing list