He passed a string as the second argument (not a keyword argument) to
Textbox constructor.  The form inputs assume that *args are
validators, so this was causing an error.

The description argument is optional, and defaults to the first
argument passed to the form input constructor (in this case, it would
have defaulted to "location").

Maybe we could make a better error message -- add something like:

if not isinstance(v, form.Validator):
    raise SyntaxError, "%s is not a Validator" % repr(v)



On Jun 22, 5:36 am, Branko Vukelic <[email protected]> wrote:
> 2009/6/22 Carlos Ríos Vera <[email protected]>:
>
> > In the first pastebin at line 19 I added a textbox without the label
> > "description". For that reason I got that exception.
>
> I think description should be made optional, though. No need to force
> it, is there? Just default to '' if it's not specified?
>
> --
> Branko
>
> eml: [email protected]
> alt: [email protected]
> blg1:http://sudologic.blogspot.com/
> blg2:http://brankovukelic.blogspot.com/
> img:http://picasaweb.google.com/bg.branko
> twt:http://www.twitter.com/foxbunny/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to