Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ValueError: too many values to unpack" with SQLAlchemy 1.2.2 #324

Closed
command-tab opened this issue Feb 1, 2018 · 6 comments
Closed

"ValueError: too many values to unpack" with SQLAlchemy 1.2.2 #324

command-tab opened this issue Feb 1, 2018 · 6 comments

Comments

@command-tab
Copy link

When using SQLAlchemy 1.2.2 with Flask-WTF 0.14.2, using a QuerySelectField, Flask-WTF raises "ValueError: too many values to unpack" in wtforms/ext/sqlalchemy/fields.py line 189, in get_pk_from_identity. It appears that SQLAlchemy 1.2 and later returns a third member from that call, and the library only expects two. Here's separate project's PR about the issue, and whose fix may be worth considering:
wtforms/wtforms-sqlalchemy#10

I've put together a small Flask app demonstrating the bug here:
https://github.com/commandtab/flask-wtf-example

@davidism
Copy link
Member

davidism commented Feb 1, 2018

That's part of WTForms, not Flask-WTF.

@davidism davidism closed this as completed Feb 1, 2018
@davidism
Copy link
Member

davidism commented Feb 1, 2018

@lepture what do you want to do here? WTForms isn't being updated, but I don't really want to pull this into Flask-WTF.

@command-tab
Copy link
Author

@davidism Oh, silly me! I should have seen that it was an issue directly in WTForms.

What do you mean when you said WTForms isn’t being updated? Is the project no longer maintained?

Thanks!

@davidism
Copy link
Member

davidism commented Feb 1, 2018

It's still stable and usable, but I don't have access to make new releases, only to merge stuff.

@command-tab
Copy link
Author

Hmm. Should I open a similar issue or PR over in WTForms for someone to review and merge, then a project owner to release?

@davidism
Copy link
Member

davidism commented Feb 1, 2018

You can, I can review and merge it at some point when I have time.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants