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

Get Error "not enough values to unpack (expected 2, got 0)" ver. 1.7.0 - 1.7.1 #648

Open
pontios opened this issue Sep 11, 2024 · 2 comments

Comments

@pontios
Copy link

pontios commented Sep 11, 2024

`In template C:\Users\iskander\Desktop\shop\venv\Lib\site-packages\django\contrib\admin
\templates\admin\includes\fieldset.html, error at line 25

- 16 {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}
- 17 <div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %}    field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% endif %}{% if field.is_checkbox %} checkbox-row{% endif %}">
- 18 {% if field.is_checkbox %}
- 19  {{ field.field }}{{ field.label_tag }}
- 20  {% else %}
- 21    {{ field.label_tag }}
- 22     {% if field.is_readonly %}
- 23       <div class="readonly">{{ field.contents }}</div>
- 24   {% else %}
- 25         **{{ field.field }}**
- 26    {% endif %}
- 27    {% endif %}
- 28          </div>
- 29    {% if field.field.help_text %}
- 30         <div class="help"{% if field.field.id_for_label %} 
-                 id="{{ field.field.id_for_label }}_helptext"{% endif %}>
- 31          <div>{{ field.field.help_text|safe }}</div>
- 32          </div>
- 33       {% endif %}
- 34       </div>
- 35  {% endfor %}

Expected Behavior

Actual Behavior

Tell us what happens instead.

Possible Fix

Not obligatory, but you can suggest a fix or reason for the bug.

Steps to Reproduce

This is not required, but it would be highly appreciated if you
provided a link to a live example, or an unambiguous set of steps to
reproduce this bug. Include code to reproduce, if relevant.

Your Environment

Include relevant details about the environment you experienced the bug in.

  1. Request Method: GET
  2. Request URL: http: //127.0.0.1:8000/admin/shop/product/add/
  3. Django Version: 5.1.1
  4. Exception Type: ValueError
  5. Exception Value: not enough values to unpack (expected 2, got 0)
  • Version used: 1.7.0-1.7.1
  • Django 5.1.1, pip 24.2):
  • Operating System and version: windows11
  • Link to your project (if applicable):
@Dresdn
Copy link
Contributor

Dresdn commented Sep 11, 2024

Looking like field.field is empty. It's hard to debug from the template site. Can you share the view or anything around how you're building the field?

Based on what you have, not even sure where this package comes into the mix.

@wolfmetr
Copy link

wolfmetr commented Dec 23, 2024

There is an issue with the ENUM attribute type (Django Version: 4.2.17).

I found a fix that helped me here:
altimore@9aa90c6

сс @altimore

wolfmetr pushed a commit to wolfmetr/django-eav2 that referenced this issue Dec 23, 2024
…uples to avoid 'not enough values to unpack' error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants