Issue #161: No such table error with celery (conservancy/kallithea)

Michael DePalatis issues-reply at bitbucket.org
Tue Oct 6 10:26:23 UTC 2015


New issue 161: No such table error with celery
https://bitbucket.org/conservancy/kallithea/issues/161/no-such-table-error-with-celery

Michael DePalatis:

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.




More information about the kallithea-general mailing list