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
Click new Application will result in ValueError: too many values to unpack (expected 3)
Steps to Reproduce
Go to /account/settings/applications/
Click on '+ New Application'
See error
Expected behavior
Screenshots (if applicable)
127.0.0.1 - - [29/Nov/2024 13:58:37] "GET /account/settings/applications/clients/new/ HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 2552, in __call__
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__
return self.app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/werkzeug/middleware/dispatcher.py", line 78, in __call__
return app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 2532, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/views/settings.py", line 145, in client_new
return render_template(
^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/templating.py", line 147, in render_template
return _render(app, template, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/flask/templating.py", line 130, in _render
rv = template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/templates/semantic-ui/invenio_oauth2server/settings/client_new.html", line 13, in top-level template code
{%- from "invenio_oauth2server/settings/_macros.html" import render_field with context %}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/templates/semantic-ui/invenio_oauth2server/settings/index.html", line 13, in top-level template code
{%- import "invenio_oauth2server/settings/helpers.html" as helpers with context %}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_theme/templates/semantic-ui/invenio_theme/page_settings.html", line 15, in top-level template code
{%- set title = _("Settings") %}
File "/home/user/INVENIO/issues/invenio-app-rdm/invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html", line 11, in top-level template code
{%- extends "invenio_theme/page.html" -%}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_theme/templates/semantic-ui/invenio_theme/page.html", line 86, in top-level template code
{%- block body %}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_theme/templates/semantic-ui/invenio_theme/page.html", line 97, in block 'body'
{%- block body_inner %}
File "/home/user/INVENIO/issues/invenio-app-rdm/invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html", line 21, in block 'body_inner'
{%- block page_body %}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_theme/templates/semantic-ui/invenio_theme/page_settings.html", line 51, in block 'page_body'
{%- block settings_content scoped %}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/templates/semantic-ui/invenio_oauth2server/settings/client_new.html", line 23, in block 'settings_content'
{{ render_field(field) }}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/jinja2/runtime.py", line 782, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/templates/semantic-ui/invenio_oauth2server/settings/_macros.html", line 22, in template
{{ field(placeholder=_(field.label.text | string), **extras) }}
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/wtforms/fields/core.py", line 176, in __call__
return self.meta.render_field(self, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/wtforms/meta.py", line 64, in render_field
return field.widget(field, **render_kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/werkzeug/local.py", line 570, in <lambda>
__call__ = _ProxyLookup(lambda self, *args, **kwargs: self(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/3.12.6/envs/latest-build/lib/python3.12/site-packages/invenio_oauth2server/theme/semantic/form_styling.py", line 29, in __call__
for val, label, selected in field.iter_choices():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
Extra
Looks like adding extra , _ to the unpacked values in iter_choices() fix the issue here
Package version (if known): 13.0.0b1.dev18, V12
Describe the bug
Click new Application will result in
ValueError: too many values to unpack (expected 3)
Steps to Reproduce
/account/settings/applications/
Expected behavior
Screenshots (if applicable)
Extra
Looks like adding extra
, _
to the unpacked values initer_choices()
fix the issue heresee: https://wtforms.readthedocs.io/en/3.2.x/widgets/#wtforms.widgets.Select:~:text=value%2C%20label%2C%20selected%2C-,render_kw,-).%20It%20also
The text was updated successfully, but these errors were encountered: