Delete repo-group

A. Klitzing aklitzing at gmail.com
Thu Jul 22 16:13:24 UTC 2021


Hi there,

I tested to upgrade from 0.5.2 to 0.7.0 here. If I want to delete a
review group I get an error 500.

1. Create an empty repository group
2. Go to settings, delete repository group
3. Error 500


sqlalchemy.orm.exc.DetachedInstanceError

sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <RepoGroup
at 0x7f2c00b6d610> is not bound to a Session; lazy load operation of
attribute 'parent_group' cannot proceed (Background on this error at:
http://sqlalche.me/e/13/bhk3)

Traceback (most recent call last)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/wsgiapp.py",
line 82, in __call__

response = self.wrapped_dispatch(controller, environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/appwrappers/errorpage.py",
line 64, in __call__

resp = self.next_handler(controller, environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/appwrappers/caching.py",
line 54, in __call__

return self.next_handler(controller, environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/appwrappers/session.py",
line 71, in __call__

response = self.next_handler(controller, environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/appwrappers/i18n.py",
line 71, in __call__

return self.next_handler(controller, environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/wsgiapp.py",
line 243, in _dispatch

return controller(environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/kallithea/controllers/base.py",
line 523, in __call__

return super(BaseController, self).__call__(environ, context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/controllers/dispatcher.py",
line 118, in __call__

response = self._perform_call(context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/controllers/dispatcher.py",
line 107, in _perform_call

r = self._call(action, params, remainder=remainder, context=context)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/controllers/decoratedcontroller.py",
line 129, in _call

output = controller_caller(context_config, bound_controller_callable,
remainder, params)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/controllers/decoration.py",
line 21, in _decorated_controller_caller

return application_controller_caller(tg_config, controller, remainder, params)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/tg/configurator/components/dispatch.py",
line 114, in _call_controller

return controller(*remainder, **params)

File "<decorator-gen-5>", line 2, in delete

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/kallithea/lib/auth.py",
line 572, in __wrapper

return func(*fargs, **fkwargs)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/kallithea/controllers/admin/repo_groups.py",
line 271, in delete

if gr.parent_group:

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py",
line 294, in __get__

return self.impl.get(instance_state(instance), dict_)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py",
line 730, in get

value = self.callable_(state, passive)

File "/home/andre/tmp/kallithea/lib/python3.9/site-packages/sqlalchemy/orm/strategies.py",
line 717, in _load_for_state

raise orm_exc.DetachedInstanceError(

sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <RepoGroup
at 0x7f2c00b6d610> is not bound to a Session; lazy load operation of
attribute 'parent_group' cannot proceed (Background on this error at:
http://sqlalche.me/e/13/bhk3)

The debugger caught an exception in your WSGI application. You can now
look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you
can click on the "Traceback" headline. From the text traceback you can
also create a paste of it. For code execution mouse-over the frame you
want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there
are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
ctx the context of the failed request




By the way... I receive this in my log if I create a new repository
with a clone:
  Fehler: Hook changegroup.kallithea_push_action löste eine Ausnahme
aus: Environment variable KALLITHEA_EXTRAS not found
But the repository works after that.


Best regards
   André Klitzing


More information about the kallithea-general mailing list