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’)

del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon Twitter

Tags: , , ,

Leave a Reply

You must be logged in to post a comment.