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.

Import error - Django 3.0.1 - ImportError: cannot import name 'available_attrs' from 'django.utils.decorators'

See original GitHub issue

Hi, I am using drf-extensions 0.5.0 with Django 3.0.1 and Python 3.7. However, when I try to use the package, I get this error. I believe this has something to do with compatibility if Django 3.0.

Is this an easy fix?

File "/sam/Service/venv/lib/python3.7/site-packages/rest_framework_extensions/cache/decorators.py", line 4, in <module>
    from django.utils.decorators import available_attrs
ImportError: cannot import name 'available_attrs' from 'django.utils.decorators' (/sam/Service/venv/lib/python3.7/site-packages/django/utils/decorators.py)


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
auvipycommented, Jan 17, 2020

will push a new pypi release soon

1reaction
auvipycommented, Aug 21, 2020

thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

What became available_attrs on Django 3? - python
I searched for an adaptation of available_attrs, and I quickly found that it has been removed for the new version. And when I...
Read more >
[Django] #16136: Error was: cannot import name utils
File "/usr/share/django/Django-1.3/django/db/backends/mysql/base.py", line 28, in <module> from django.db import utils ImportError: cannot import name utils
Read more >
django.utils.decorators - Django documentation
try: from contextlib import ContextDecorator except ImportError: ... name) if not callable(func): raise TypeError( "Cannot decorate '{0}' as it isn't a ...
Read more >
ImportError: cannot import name 'Topic' from 'first_app'-django
Coding example for the question ImportError: cannot import name 'Topic' from 'first_app'-django.
Read more >
ImportError cannot import name render to response ... - Edureka
After upgrading to Django 3.0, I get the following error: ImportError: cannot import name 'render_to_response' from 'django.shortcuts'.
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