I need help with this error, I have a series of SelectFields with multiple choices declared in the class like this one:
TIP_FINANZIAMENTO = SelectField('TIP_FINANZIAMENTO' choices=[('',''),('01', '01 -Mortage with amortization/repayment plan'),('02'.........
and goes on for a while, it's pretty long.
There are more than one like this. I have tried to remove all choices because I thought maybe I put too many but it returns the same error:
ValueError: too many values to unpack
These fields are then passed to a QuickForm in the front end page. Any Idea why this is happening?
RETURNS THE FOLLOWING ERROR File "/home/itad/DICP_evo_dev/venv/lib/python2.7/site-packages/wtforms/fields/core.py", line 454, in iter_choices
super(SelectField, self).__init__(label, validators, **kwargs)
self.coerce = coerce
self.choices = copy(choices)
def iter_choices(self):
for value, label in self.choices:
yield (value, label, self.coerce(value) == self.data)
def process_data(self, value):
try:
self.data = self.coerce(value)
ValueError: too many values to unpack