Add User Group Crash

Issue #900 closed
Nikolay Kuzmin
created an issue

RhodeCode 2.1.0 After create new UserGroup:"500 Internal Server Error" Subject: WebApp Error: <class 'routes.util.GenerationException'>: Could not generate URL. Called with args: ('edit_users_group', ) {'id': 1}

Module rhodecode.controllers.admin.user_groups:109 in index << "members": len(user_gr.members), "active": h.boolicon(user_gr.users_group_active), "action": user_group_actions(user_gr.users_group_id, user_gr.users_group_name) })

"action": user_group_actions(user_gr.users_group_id, user_gr.users_group_name) Module rhodecode.controllers.admin.user_groups:99 in <lambda> << user_group_actions = lambda user_group_id, user_group_name: ( template.get_def("user_group_actions") .render(user_group_id, user_group_name, =, h=h, c=c) ) for user_gr in group_iter: .render(user_group_id, user_group_name, =, h=h, c=c) Module mako.template:412 in render << """ return runtime.render(self, self.callable, args, data)

       def render_unicode(self, *args, **data):

return runtime.render(self, self.callable, args, data) Module mako.runtime:766 in render << _render_context(template, callable, context, *args, kwargs_for_callable(callable, data)) return context._pop_buffer().getvalue() kwargs_for_callable(callable, data)) Module mako.runtime:802 in render_context << # otherwise, call the actual rendering method specified (inherit, lclcontext) = _populate_self_namespace(context, tmpl.parent) _exec_template(callable, context, args=args, kwargs=kwargs)

   def _exec_template(callable_, context, args=None, kwargs=None):

exec_template(callable, context, args=args, kwargs=kwargs) Module mako.runtime:819 in exec_template << callable(context, args, kwargs) except Exception, e: render_error(template, context, e) except: e = sys.exc_info()[0] _render_error(template, context, e) Module mako.runtime:828 in _render_error << def _render_error(template, context, error): if template.error_handler: result = template.error_handler(context, error) if not result: raise error result = template.error_handler(context, error) Module mako.runtime:817 in _exec_template << error = None try: callable(context, *args, kwargs) except Exception, e: render_error(template, context, e) callable(context, args, kwargs) Module data_table__dt_elements_html:112 in render_user_group_actions << __M_writer(u'\n <div style="float:left">\n <a href="') # SOURCE LINE 152 __M_writer(escape(h.url('edit_users_group', id=user_group_id))) __M_writer(u'" title="') __M_writer(escape(_('Edit'))) __M_writer(escape(h.url('edit_users_group', id=user_group_id))) Module paste.registry:155 in __call__ << def __call__(self, *args, kw): return self._current_obj()(args, *kw)

       def __repr__(self):

return self._current_obj()(args, *kw) Module routes.util:412 in call << raise GenerationException( "Could not generate URL. Called with args: %s %s" % \ (args, kargs)) return url

(args, kargs)) GenerationException: Could not generate URL. Called with args: ('edit_users_group',) {'id': 1} CGI Variables CONTENT_TYPE '; charset="utf-8"' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' HTTP_ACCEPT_CHARSET 'windows-1251,utf-8;q=0.7,*;q=0.3' HTTP_ACCEPT_ENCODING 'gzip,deflate,sdch' HTTP_ACCEPT_LANGUAGE 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4' HTTP_CACHE_CONTROL 'max-age=0' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE 'rhodecode=6db002895edaca5ae901f1fe96f63a039221732acdc524409310459eb1eafe8aa8159c28' HTTP_HOST '10.124.13.53:5000' HTTP_REFERER 'http://10.124.13.53:5000/_admin/user_groups/new' HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.95 Safari/537.4' PATH_INFO '/_admin/user_groups' REMOTE_ADDR '10.124.54.123' REQUEST_METHOD 'GET' SERVER_NAME 'tonipi-ora-06' SERVER_PORT '5000' SERVER_PROTOCOL 'HTTP/1.1' SERVER_SOFTWARE 'waitress'

WSGI Variables application <beaker.middleware.SessionMiddleware object at 0x377c550> beaker.get_session <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x377c550>> beaker.session {'rhodecode_user': {'username': u'rhode', 'is_authenticated': True, 'user_id': 2}, 'flash': [('success', u'Created user group NaviDevelopers')], '_accessed_time': 1382613318.338273, '_creation_time': 1382613299.207612} paste.registry <paste.registry.Registry object at 0x7fc48849acd0> paste.throw_errors True pylons.action_method <bound method UserGroupsController.index of <rhodecode.controllers.admin.user_groups.UserGroupsController object at 0x7fc4704bb310>> pylons.controller <rhodecode.controllers.admin.user_groups.UserGroupsController object at 0x7fc4704bb310> pylons.environ_config {'session': 'beaker.session', 'cache': 'beaker.cache'} pylons.pylons <pylons.util.PylonsContext object at 0x7fc4704bb0d0> pylons.routes_dict {'action': u'index', 'controller': u'admin/user_groups'} routes.route <routes.route.Route object at 0x3572a50> routes.url <routes.util.URLGenerator object at 0x7fc4704bbf90> webob._parsed_query_vars (GET([]), '') webob.adhoc_attrs {'user': <AuthUser('id:2[rhode] ip:10.124.54.123 auth:True')>, 'language': 'en-us'} wsgi process 'Multithreaded' wsgi._org_proto 'http' wsgi.file_wrapper <class 'waitress.buffers.ReadOnlyFileBasedBuffer'> wsgiorg.routing_args (<routes.util.URLGenerator object at 0x7fc4704bbf90>, {'action': u'index', 'controller': u'admin/user_groups'})