Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support the latest version of Django

See original GitHub issue

Py3.6 system test would fail with the latest version of Django, need to get it fixed.

============================= test session starts ==============================
platform linux -- Python 3.6.0, pytest-3.2.2, py-1.8.0, pluggy-0.4.0
rootdir: /root/repo, inifile:
plugins: cov-2.5.1
collected 14 items                                                              

tests/system/stats/prometheus/ .
tests/system/stats/stackdriver/ Dropping 1 non-positive bucket boundaries
.Dropping 1 non-positive bucket boundaries
tests/system/trace/basic_trace/ Test simple tracing...
Test simple tracing...
tests/system/trace/django/ 95ba383f898c4fc1abf49ccc23f50ad9/a226ee08ca664278;o=1
--2019-03-04 22:55:31--  http://localhost:8000/
Resolving localhost (localhost)...,, ::1
Connecting to localhost (localhost)||:8000... failed: Connection refused.
Connecting to localhost (localhost)||:8000... failed: Connection refused.
Connecting to localhost (localhost)|::1|:8000... failed: Cannot assign requested address.

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f148153fa60>
Traceback (most recent call last):
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/", 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 "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/", line 225, in wrapper
    fn(*args, **kwargs)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/commands/", line 117, in inner_run
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/", line 379, in check
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/", line 366, in _run_checks
    return checks.run_checks(**kwargs)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/", line 71, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/", line 40, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/", line 57, in _load_all_namespaces
    url_patterns = getattr(resolver, 'url_patterns', [])
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/", line 37, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/", line 533, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/", line 37, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/", line 526, in urlconf_module
    return import_module(self.urlconf_name)
  File "/root/repo/.nox/sys-3-6/lib/python3.6/importlib/", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/root/repo/tests/system/trace/django/app/", line 37, in <module>
    url(r'^admin/', include(,
  File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/", 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

reyangcommented, May 28, 2019

@odeke-em FYI, @zoidbergwill is working on supporting Django 2.x in #358, which is using connection.execute_wrappers.

timgrahamcommented, Jun 28, 2019

It looks to me like existing versions of OpencensusMiddleware should work with fine with Django 2.x. The test failures only required changes in tests (#694). removes the install_requires restriction for Django 2.x.

As far as I can tell, #358 is a new feature and has nothing to do with getting existing functionality working with Django 2.x.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download Django
We recommend using the latest version of Python 3. The last version to support Python 2.7 is Django 1.11 LTS. See the FAQ...
Read more >
Django -
The last feature release for a major version will be designated as long-term support (LTS) release. These releases will get security and data...
Read more >
Django - PyPI
Django 4.1.4 · Project description · Supporting the Development of Django · Project details · Release history Release notifications | RSS feed ·...
Read more >
Release Notes - Django REST framework
This is the last Django REST Framework release that will support Python 2. Be sure to upgrade to Python 3 before upgrading to...
Read more >
Django support - PyCharm Documentation - JetBrains
PyCharm supports the latest Django versions. The corresponding Python versions depend on Django. See What Python version can I use with Django?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found