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.

Module 'rest_framework' has no attribute 'routers'

See original GitHub issue

Hi, you are doing great work!

The following code causes the problem for me

from rest_framework import routers
__ROUTER = routers.DefaultRouter()

main\rest_api\urls.py:4: error: Module 'rest_framework' has no attribute 'routers'

Issue Analytics

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

github_iconTop GitHub Comments

0reactions
kolomenkincommented, Feb 26, 2019

Thanks a lot for your help! I’m new to python type hinting and it is hard to understand right way of doing things.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FastAPI - module 'app.routers.test' has no attribute 'routes'
I think you want: app.include_router(test.router, prefix="/api/v1/test"). rather than: app.include_router(test, prefix="/api/v1/test").
Read more >
AttributeError: module 'routes' has no attribute 'routes' · Issue #19
I am using Linux. Used the script to install everything from a fresh installation. Configured and ran the psql service and db. No...
Read more >
Routers - Django REST framework
The . routes attribute is a list of Route named tuples. The arguments to the Route named tuple are: url: A string representing...
Read more >
Django Rest Framework extensions documentation
Nested routes allows you create nested resources with viewsets. For example: from rest_framework_extensions.routers import ExtendedSimpleRouter from yourapp.
Read more >
AttributeError: partially initialized module has no attribute ...
The solution is not to name the Python file the same as any of the modules being imported in that Python file. Related....
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