Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #224 (closed defect: invalid)

Opened 14 years ago

Last modified 12 years ago

Exceptions being raised upon widgets insertion.

Reported by: Lucas Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TG Widgets Version:
Severity: normal Keywords:


When trying to set not_empty to True the insert method raises an exception.

Example code:

createUserForm = widgets.TableForm(widgets=[
                widgets.TextField("userId", validator=validators.PlainText(not_empty=True)),
                widgets.TextField("emailAddress", validator=validators.Email()),
                widgets.TextField("age", default=0,

Stack Trace:

  File "/Users/lucas/dev/vsx/third-party/turbogears/turbogears/widgets/base.py", line 100, in insert
    convert=convert, **kw),
  File "/Users/lucas/dev/vsx/third-party/turbogears/turbogears/widgets/base.py", line 73, in create_dict
    value = self.validator.from_python(value)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/FormEncode-0.3-py2.4.egg/formencode/api.py", line 261, in from_python
    value, state)
Invalid: Please enter a value

A similar issue occurs when I try to use the validators.Email() method in the above code.

Change History

comment:1 Changed 14 years ago by lucas

Upon further investigation it seems like these errors are happening because the value in the form field is failing the test. (ie the value is empty or an email address does not exist)

Still not sure how to fix this though.

comment:2 Changed 14 years ago by SuperJared <jared.kuolt@…>

  • Status changed from new to closed
  • Resolution set to invalid
Note: See TracTickets for help on using tickets.