Issue #161: No such table error with celery
| Reported by: | Michael DePalatis |
| State: | closed |
| Created on: | 2015-10-06 10:26 |
| Updated on: | 2015-10-06 15:27 |
Description
I am trying to get Celery working on an installation of Kallithea (version 0.3) but have run into several issues. The latest involves an error while creating a repository. Full traceback:
[2015-10-06 12:13:49,885: ERROR/MainProcess] Task kallithea.lib.celerylib.tasks.create_repo[b7a88ea0-f70f-4f01-bbbc-1ef5da35d641] raised exception: SQLAlchemyError('(OperationalError) no such table: users',)
Traceback (most recent call last):
File "/home/iontrap/kallithea/lib/python2.7/site-packages/celery/execute/trace.py", line 34, in trace
return cls(states.SUCCESS, retval=fun(*args, **kwargs))
File "/home/iontrap/kallithea/lib/python2.7/site-packages/celery/task/base.py", line 234, in __call__
return self.run(*args, **kwargs)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/celery/app/__init__.py", line 141, in run
return fun(*args, **kwargs)
File "<string>", line 2, in create_repo
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/lib/celerylib/__init__.py", line 123, in __wrapper
ret = func(*fargs, **fkwargs)
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/lib/celerylib/tasks.py", line 348, in create_repo
cur_user = UserModel(DBS)._get_user(cur_user)
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/model/__init__.py", line 114, in _get_user
callback=User.get_by_username)
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/model/__init__.py", line 95, in _get_instance
return cls.get(instance)
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/model/db.py", line 122, in get
return cls.query().get(id_)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 775, in get
return self._load_on_ident(key)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2514, in _load_on_ident
return q.one()
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2184, in one
ret = list(self)
File "/home/iontrap/kallithea/local/lib/python2.7/site-packages/Kallithea-0.3-py2.7.egg/kallithea/lib/caching_query.py", line 83, in __iter__
return Query.__iter__(self)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
return self._execute_and_instances(context)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
params)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
context)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
context)
File "/home/iontrap/kallithea/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: users
None
As an aside, some of the other issues I have found stem from requiring such an old version of Celery. I have begun work on a fork to test that more recent versions of Celery can be used instead.
Attachments
Comments
Comment by Mads Kiilerich, on 2015-10-06 12:30
This doesn't sound like a bug report. Please don't use the issue tracker for "support" requests.
Anyway, the error message gives a strong hint that you haven't told celery to invoke Kallithea with the right config with the right database info.
The latest Celery seems to have significant API changes. It would be nice to update if someone will do the work.
Comment by domruf, on 2015-10-06 15:25
you can ask for support on the mailing list
http://news.gmane.org/gmane.comp.version-control.kallithea
please include your celery configuation
Comment by Michael DePalatis, on 2015-10-06 15:27
I considered it a bug since I set this up by following the documentation and sample configuration settings but apparently need to do something else as well. But I agree now that this would be better handled elsewhere, so I am closing the issue.
Comment by Michael DePalatis, on 2015-10-06 15:27