Pylons

AttributeError: 'thread._local' object has no attribute 'mapper' (comments)

Jul 18, 2010 11:12:05 AM by tjelvar
  • weberror.evalexception : 431, in respond

    app_iter = self.application(environ, detect_start_response)
    
  • beaker.middleware : 152, in __call__

    return self.wrap_app(environ, session_start_response)
    
  • routes.middleware : 131, in __call__

    response = self.app(environ, start_response)
    
  • pylons.wsgiapp : 107, in __call__

    response = self.dispatch(controller, environ, start_response)
    
  • pylons.wsgiapp : 312, in dispatch

    return controller(environ, start_response)
    
  • scorpio.lib.base : 18, in __call__

    return WSGIController.__call__(self, environ, start_response)
    
  • pylons.controllers.core : 211, in __call__

    response = self._dispatch_call()
    
  • pylons.controllers.core : 162, in _dispatch_call

    response = self._inspect_call(func)
    
  • pylons.controllers.core : 105, in _inspect_call

    result = self._perform_call(func, args)
    
  • pylons.controllers.core : 57, in _perform_call

    return func(**args)
    
  • scorpio.controllers.browse : 28, in itc

    return render('/derived/browse/itc.html')
    
  • pylons.templating : 243, in render_mako

    cache_type=cache_type, cache_expire=cache_expire)
    
  • pylons.templating : 218, in cached_template

    return render_func()
    
  • pylons.templating : 240, in render_template

    return literal(template.render_unicode(**globs))
    
  • mako.template : 198, in render_unicode

    as_unicode=True)
    
  • mako.runtime : 403, in _render

    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
    
  • mako.runtime : 434, in _render_context

    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
    
  • mako.runtime : 452, in _exec_template

    _render_error(template, context, e)
    
  • mako.runtime : 462, in _render_error

    result = template.error_handler(context, error)
    
  • mako.runtime : 450, in _exec_template

    callable_(context, *args, **kwargs)
    
  • _base_index_html : 47, in render_body

    __M_writer(escape(next.body()))
    
  • mako.runtime : 278, in <lambda>

    return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)
    
  • _derived_browse_itc_html : 68, in render_body

    __M_writer(escape( c.paginator.pager(format='~2~')))
    
  • webhelpers.paginate : 688, in pager

    result = re.sub(r'~(\d+)~', _range, format)
    
  • re : 150, in sub

    return _compile(pattern, 0).sub(repl, string, count)
    
  • webhelpers.paginate : 661, in _range

    nav_items.append( _pagerlink(thispage, text) )
    
  • webhelpers.paginate : 597, in _pagerlink

    link_url = url_for(**link_params)
    
  • routes.util : 189, in url_for

    encoding = config.mapper.encoding
    
  • routes : 14, in __getattr__

    return getattr(self.__shared_state, name)
    
AttributeError: 'thread._local' object has no attribute 'mapper'

Description

No Description Entered

Python on : 2.5.2
beaker1.5.3
decorator3.0.0
formencode1.2.2
mako0.3.2
nose0.11.3
paste1.7.2
pastedeploy1.3.3
pastescript1.7.3
pygments0.11.1
pylons1.0
routes1.12.3
simplejson2.0.9
sqlalchemy0.5.8
tempita0.4
weberror0.10.2
webhelpers0.6.4
webob0.9.8
webtest1.2

Comments (1)

tjelvar
Jul 18, 2010 11:24:35 AM

This does not seem to be the first time this problem has cropped up.

http://pylonshq.com/tracebacks/af4b2087ed15e60e70726c05e20c5f83

Basically I’m trying to use the paginate.pager function in one of my templates. I did manage to get this working with pylons 0.9.7. However, now that I have updated to pylons 1.0 it does not seem to work any more. The code seems to fall over as the webhelper paginator.pager function seems to make use of the routes url_for call, which appears to have been deprecated in pylons 1.0.

Does this mean that the webhelper module is out of sync with pylons 1.0 or that my easy_install of pylons 1.0 failed to update the webhelpers module. I currently seem to be running webhelpers 0.6.4.

Any thoughts?

Suggest a fix or tip to help solve this traceback.

You must login before you can comment.

Powered by Pylons - Contact Administrators