Try upgrading WebHelpers:

http://groups.google.com/group/turbogears/browse_thread/thread/a1cedd566bf96797/ea47bf37e1d8dda9?lnk=gst&q=url_for+could+not+generate+URL#ea47bf37e1d8dda9

Tim


On 10/11/2010 03:40 PM, Jim Steil wrote:
>  Hi
>
> Working on my first TG 2.1 beta 1 app.  I'm porting code from a TG
> 1.09 project and have made a few changes to the new quickstarted app. 
> My problem is that at some point the TG 2 Admin stopped working.  Here
> is a the traceback:
>
> URL: http://localhost:8080/admin/groups/
> File
> 'c:\\Python26\\lib\\site-packages\\weberror-0.10.1-py2.6.egg\\weberror\\evalexception.py',
> line 431 in respond
>   app_iter = self.application(environ, detect_start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\configuration.py',
> line 783 in remover
>   return app(environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\repoze.tm2-1.0a5-py2.6.egg\\repoze\\tm\\__init__.py',
> line 23 in __call__
>   result = self.application(environ, save_status_and_headers)
> File
> 'c:\\Python26\\lib\\site-packages\\repoze.who-1.0.18-py2.6.egg\\repoze\\who\\middleware.py',
> line 107 in __call__
>   app_iter = app(environ, wrapper.wrap_start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\toscawidgets-0.9.9-py2.6.egg\\tw\\core\\middleware.py',
> line 43 in __call__
>   return self.wsgi_app(environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\toscawidgets-0.9.9-py2.6.egg\\tw\\core\\middleware.py',
> line 68 in wsgi_app
>   resp = req.get_response(self.application)
> File 'build\\bdist.win32\\egg\\webob\\request.py', line 919 in
> get_response
> File 'build\\bdist.win32\\egg\\webob\\request.py', line 887 in
> call_application
> File
> 'c:\\Python26\\lib\\site-packages\\toscawidgets-0.9.9-py2.6.egg\\tw\\core\\resource_injector.py',
> line 68 in _injector
>   resp = req.get_response(app)
> File 'build\\bdist.win32\\egg\\webob\\request.py', line 919 in
> get_response
> File 'build\\bdist.win32\\egg\\webob\\request.py', line 887 in
> call_application
> File
> 'c:\\Python26\\lib\\site-packages\\beaker-1.5.2-py2.6.egg\\beaker\\middleware.py',
> line 73 in __call__
>   return self.app(environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\beaker-1.5.2-py2.6.egg\\beaker\\middleware.py',
> line 152 in __call__
>   return self.wrap_app(environ, session_start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\routes-1.12-py2.6.egg\\routes\\middleware.py',
> line 131 in __call__
>   response = self.app(environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\wsgiapp.py',
> line 125 in __call__
>   response = self.dispatch(controller, environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\wsgiapp.py',
> line 324 in dispatch
>   return controller(environ, start_response)
> File 'C:\\dev\\infocenter\\infocenter\\lib\\base.py', line 32 in __call__
>   return TGController.__call__(self, environ, start_response)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\controllers\\core.py',
> line 221 in __call__
>   response = self._dispatch_call()
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\controllers\\core.py',
> line 172 in _dispatch_call
>   response = self._inspect_call(func)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\controllers\\core.py',
> line 107 in _inspect_call
>   result = self._perform_call(func, args)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\controllers\\dispatcher.py',
> line 254 in _perform_call
>   r = self._call(func, params, remainder=remainder)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\controllers\\decoratedcontroller.py',
> line 129 in _call
>   response = self._render_response(controller, output)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\controllers\\decoratedcontroller.py',
> line 305 in _render_response
>   template_name=template_name)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\render.py',
> line 156 in render
>   return render_function(template_name, template_vars, **kwargs)
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\render.py',
> line 194 in render_mako
>   return templating.render_mako(template_name,
> extra_vars=template_vars, **kwargs)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\templating.py',
> line 274 in render_mako
>   cache_type=cache_type, cache_expire=cache_expire)
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\templating.py',
> line 249 in cached_template
>   return render_func()
> File
> 'c:\\Python26\\lib\\site-packages\\pylons-0.9.7-py2.6.egg\\pylons\\templating.py',
> line 271 in render_template
>   return literal(template.render_unicode(**globs))
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\template.py',
> line 138 in render_unicode
>   return runtime._render(self, self.callable_, args, data,
> as_unicode=True)
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\runtime.py',
> line 364 in _render
>   _render_context(template, callable_, context, *args,
> **_kwargs_for_callable(callable_, data))
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\runtime.py',
> line 381 in _render_context
>   _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\runtime.py',
> line 414 in _exec_template
>   callable_(context, *args, **kwargs)
> File 'C:\\dev\\infocenter\\infocenter\\templates\\master.mak.py', line
> 54 in render_body
>   __M_writer(escape(self.content_wrapper()))
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\runtime.py',
> line 255 in <lambda>
>   return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
> File 'C:\\dev\\infocenter\\infocenter\\templates\\master.mak.py', line
> 249 in render_content_wrapper
>
> File
> 'c:\\Python26\\lib\\site-packages\\mako-0.2.5-py2.6.egg\\mako\\runtime.py',
> line 255 in <lambda>
>   return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
> File
> 'C:\\Users\\jsteil\\AppData\\Roaming\\Python-Eggs\\tgext.crud-0.3.8-py2.6.egg-tmp\\tgext\\crud\\templates\\get_all.mak.py',
> line 62 in render_body
>  
> __M_writer(escape(tmpl_context.paginators.value_list.pager(link='./%ss'%model.lower())))
>
> File
> 'c:\\Python26\\lib\\site-packages\\turbogears2-2.1b2-py2.6.egg\\tg\\util.py',
> line 108 in curried_function
>   return func(*args, **kwds)
> File
> 'c:\\Python26\\lib\\site-packages\\webhelpers-0.6.4-py2.6.egg\\webhelpers\\paginate.py',
> line 688 in pager
>   result = re.sub(r'~(\d+)~', _range, format)
> File 'c:\\Python26\\lib\\re.py', line 151 in sub
>   return _compile(pattern, 0).sub(repl, string, count)
> File
> 'c:\\Python26\\lib\\site-packages\\webhelpers-0.6.4-py2.6.egg\\webhelpers\\paginate.py',
> line 661 in _range
>   nav_items.append( _pagerlink(thispage, text) )
> File
> 'c:\\Python26\\lib\\site-packages\\webhelpers-0.6.4-py2.6.egg\\webhelpers\\paginate.py',
> line 597 in _pagerlink
>   link_url = url_for(**link_params)
> File
> 'c:\\Python26\\lib\\site-packages\\routes-1.12-py2.6.egg\\routes\\util.py',
> line 269 in url_for
>   (args, kargs))
> GenerationException: url_for could not generate URL. Called with args:
> () {'link': './groups', 'page': 2}
>
> Is it worth it to try to figure out what this problem is, or am I
> better off just quickstart'ing a new app and redoing my changes?  Is
> the solution obvious to a seasons tg2'er?
>
>     -Jim
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to