AttributeError: ‘function’ object has no attribute ‘replace’
While doing some coding to move a Turbogears2 application over to Pylons, I ran into an issue with Validation and ToscaWidgets.
AttributeError: ‘function’ object has no attribute ‘replace’
Validation in Pylons listed:
@validate(form=movie_form, error_handler=index)
for the decorator syntax, but, error_handler should be a name, not a function. The correct decorator should be:
@validate(form=movie_form, error_handler=’index’)
Tags: pylons, Python, toscawidgets, turbogears