exception while run...
 
Notifications
Clear all

exception while running the api endpoint

1 Posts
2 Users
0 Reactions
7 Views
0
Topic starter

raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'api.urls' from 'C:\\Users\\anuja\\Desktop\\drf-project\\api\\urls.py'>' does not appear to have any patterns in it. If you see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused by a circular import.

I have been getting this exception running the api endpoint. How to resolve this?

1 Answer
0

Hi CHANDRAVATHI MARAGANI

The issue you are facing occurs because Django cannot find any valid URL patterns in your api/urls.py file. This can happen due to several reasons:

  1. urlpatterns is not defined correctly.
  2. A circular import exists.
  3. There are syntax errors or misconfigurations.
  4. The URLs are not correctly included in the project.
  5. The api app is missing from INSTALLED_APPS.

Please check if all these points are correctly configured. If everything is correct and you still face the issue, kindly share a screenshot of the error and a ZIP file of your code so I can assist you further.

Share: