You are absolutely right. Until I devise a more concise solution, you may want to change line 196 in controllers.py form

  output = errorhandling.try_call(func, self, *args, **kw)

to

  output func( self, *args, **kw)


Cheers,
Simon

Randall wrote:
Turbogears error handling masks the traceback, making it difficult to
debug.  As an example, here is a traceback I got:

  File
"/home/randall/downloads/svn/turbogears/turbogears/controllers.py",
line 196, in _execute_func
    output = errorhandling.try_call(func, self, *args, **kw)
  File
"/home/randall/downloads/svn/turbogears/turbogears/errorhandling.py",
line 60, in try_call
    raise error
TypeError: __init__() takes at least 2 non-keyword arguments (1 given)


When this is what I should have got (modified errorhandling.py):

  File
"/home/randall/programs/mswater/tgwater/tgwater/useradmin/controllers.py",
line 27, in add
    self.form_widget = createNewUserForm()
  File
"/home/randall/programs/mswater/tgwater/tgwater/useradmin/view.py",
line 13, in createNewUserForm
    user_form = TableForm(widgets=form_widgets)
  File
"/home/randall/downloads/svn/turbogears/turbogears/widgets/newbase.py",
line 51, in widgetinit
    func(self, *args, **kw)
TypeError: __init__() takes at least 2 non-keyword arguments (1 given)

Randall



Reply via email to