question-mark
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.

EmptyResultSet removed in Django 3.1

See original GitHub issue

Version: drf-extensions 0.6.0 Django 3.1 (python 3.8, but doesn’t matter for issue)

Description: Django has removed EmptyResultSet backward compatibility. django 3.1 commit breaking drf-extensions: https://github.com/django/django/commit/129583a0d3cf69b08d058cd751d777588801b7ad

Error: from rest_framework_extensions.key_constructor import bits File "/usr/local/lib/python3.8/site-packages/rest_framework_extensions/key_constructor/bits.py", line 3, in <module> from django.db.models.sql.datastructures import EmptyResultSet ImportError: cannot import name 'EmptyResultSet' from 'django.db.models.sql.datastructures' (/usr/local/lib/python3.8/site-packages/django/db/models/sql/datastructures.py)

Workaround: Stay on Django 3.0.8

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:32
  • Comments:31 (5 by maintainers)

github_iconTop GitHub Comments

35reactions
tukycommented, Oct 6, 2020

haters gonna hate, monkeys gonna patch ;>

from django.db.models.sql import datastructures
from django.core.exceptions import EmptyResultSet

datastructures.EmptyResultSet = EmptyResultSet
25reactions
Ouradzecommented, Sep 7, 2020

Hi, sorry for the noise but a new release would be much appreciated 😃 thanks in advance to you guys !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - EmptyResultSet removed in Django 3.1 - - Bountysource
Version: drf-extensions 0.6.0. Django 3.1 (python 3.8, but doesn't matter for issue). Description: Django has removed EmptyResultSet backward compatibility.
Read more >
Django 3.1 release notes
Initially empty extra inlines can now be removed, in the same way as dynamically created ones. XRegExp is upgraded from version 2.0.0 to...
Read more >
python - [Django rest_framework]Problems in using redis as ...
This particular error is caused by drf-extensions not being compatible yet with Django 3.1+. ( drf-extensions is one of the dependencies of ...
Read more >
Compare Django release notes | CodeReview.doctor
Fixed a QuerySet.delete() crash on MySQL, following a performance regression in Django 3.1 on MariaDB 10.3.2+, when filtering against an aggregate function ...
Read more >
Django: docs/releases/3.1.txt | Fossies
We've 12 :ref:`dropped some features<removed-features-3.1>` that have reached the end of 13 their ... EmptyResultSet`` in 624 ``django.db.models.query``, ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found