makemigrations fails with too many values to unpack
See original GitHub issueFound a bug? Please fill out the sections below. 👍
Issue Summary
Using wagtail from git I created “mysite” as in the docs, when I got as far as running makemigrations it failed with the error below
OS: Ubuntu 64 bit Python: 3.5.3
Output of pip freeze:
$ pip freeze
beautifulsoup4==4.6.0
certifi==2017.11.5
chardet==3.0.4
Django==2.0
django-modelcluster==3.1
django-taggit==0.22.1
django-treebeard==4.2.0
djangorestframework==3.7.3
html5lib==0.999999999
idna==2.6
olefile==0.44
Pillow==4.3.0
pkg-resources==0.0.0
pytz==2017.3
requests==2.18.4
six==1.11.0
Unidecode==0.4.21
urllib3==1.22
wagtail==2.0a0
webencodings==0.5.1
Willow==1.0
Error:
$ python manage.py makemigrations
Traceback (most recent call last):
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/urls/conf.py", line 17, in include
urlconf_module, app_name = arg
ValueError: too many values to unpack (expected 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/base.py", line 332, in execute
self.check()
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/base.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/management/base.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/checks/registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/utils/functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/urls/resolvers.py", line 536, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/utils/functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/urls/resolvers.py", line 529, in urlconf_module
return import_module(self.urlconf_name)
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/mnt/data/home/stu/projects/work/dit/scratch/mysite/mysite/urls.py", line 12, in <module>
url(r'^django-admin/', include(admin.site.urls)),
File "/mnt/data/home/stu/.virtualenvs/dit-wagtail2/lib/python3.5/site-packages/Django-2.0-py3.5.egg/django/urls/conf.py", line 27, in include
'provide the namespace argument to include() instead.' % len(arg)
django.core.exceptions.ImproperlyConfigured: Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Makemigrations gives ValueError: too many values to unpack
I have added the new field and ran the makemigrations command and then I got ValueError: too many values to unpack ...
Read more >ValueError: too many values to unpack (expected 2)
Unpacking refers to retrieving values from a list and assigning them to a list of variables. This error occurs when the number of...
Read more >Makemigrations ValueError: too many values to unpack-django
Coding example for the question Makemigrations ValueError: too many values to unpack-django.
Read more >Python valueerror: too many values to unpack (expected 2)
The error message above tells us that we are trying to unpack too many values from a value. There are two mistakes that...
Read more >ValueError: too many values to unpack (expected 2) in Django
I am reorganizing one of my projects to be more re-usable and just generally structured better and am now getting the error below...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report @stuaxo! The line
url(r'^django-admin/', include(admin.site.urls)),
needs changing tourl(r'^django-admin/', admin.site.urls),
, I think.What is the reason that I am still getting this error even I am working on a Django 2.1.1 project?