You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that WTForms now returns four elements in iter_choices() tuples instead of the two or three that Flask-Admin expects. As a result, whenever I try to render a form that uses a SelectField or a similar field that relies on iter_choices(), I get:
ValueError: not enough values to unpack (expected 4, got 3)
Downgrading WTForms to 3.0.0 resolved the issue. I checked out their change logs and they show:
⚠️breaking change⚠️: iter_choices now returns a tuple of 4 items
Environment:
Python version: 3.10
Flask version: 3.1.0
Flask-Admin version: 1.6.1
The text was updated successfully, but these errors were encountered:
This is fixed in the (currently alpha) versions of Flask v2.0.0a0 onwards. We're loosely planning to do a full v2 release once mongoengine support (#2541) and azure-blob-storage (#2566) updates have been merged.
You may wish to try those alpha releases for now, based on your use-case, though. I will close this as the only thing outstanding is an official v2 release - there are no further specific code changes needed for this.
It seems that WTForms now returns four elements in iter_choices() tuples instead of the two or three that Flask-Admin expects. As a result, whenever I try to render a form that uses a SelectField or a similar field that relies on iter_choices(), I get:
ValueError: not enough values to unpack (expected 4, got 3)
Downgrading WTForms to 3.0.0 resolved the issue. I checked out their change logs and they show:
Environment:
The text was updated successfully, but these errors were encountered: