# ModuleNotFoundError - sub app

**URL:** <https://forum.djangoproject.com/t/modulenotfounderror-sub-app/13744>\
**Category:** Forms & APIs\
**Created:** [May 16, 2022, 10:47pm UTC](https://forum.djangoproject.com/t/modulenotfounderror-sub-app/13744 "2022-05-16T22:47:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanapka12](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kanapka12/32/8532_2.png) [@Kanapka12](https://forum.djangoproject.com/u/Kanapka12)\
**Post date:** [May 16, 2022, 10:47pm UTC](https://forum.djangoproject.com/t/modulenotfounderror-sub-app/13744/1 "2022-05-16T22:47:50Z")

</div>

Hello,  
I created sub app “slowa” in my app “angielski” then I added path to the INSTALLED\_APPS and when I run server I get the following error:

Traceback (most recent call last):  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\config.py”, line 245, in create  
app\_module = import\_module(app\_name)  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\importlib\__init_\_.py”, line 126, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)  
File “”, line 1050, in \_gcd\_import  
File “”, line 1027, in \_find\_and\_load  
File “”, line 1004, in \_find\_and\_load\_unlocked  
ModuleNotFoundError: No module named ‘slowa’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\threading.py”, line 1009, in \_bootstrap\_inner  
self.run()  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\threading.py”, line 946, in run  
self.\_target(\*self.\_args, \*\*self._kwargs)  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper  
fn(\*args, \*\*kwargs)  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\commands\runserver.py”, line 125, in inner\_run  
autoreload.raise\_last\_exception()  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py”, line 87, in raise\_last\_exception  
raise exception[1]  
File "C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\_init.py", line 398, in execute  
autoreload.check\_errors(django.setup)()  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper  
fn(\*args, \*\*kwargs)  
File "C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\_init_.py", line 24, in setup  
apps.populate(settings.INSTALLED\_APPS)  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\registry.py”, line 91, in populate  
app\_config = AppConfig.create(entry)  
File “C:\Users\krysz\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\config.py”, line 247, in create  
raise ImproperlyConfigured(  
django.core.exceptions.ImproperlyConfigured: Cannot import ‘slowa’. Check that ‘angielski.slowa.apps.SlowaConfig.name’ is correct.

Here’s my settings.py file:

```auto
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'angielski.apps.AngielskiConfig',
    'angielski.slowa.apps.SlowaConfig',
]

```

Structure:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/f/f6b773a513d0f2e136494072473ad94cf4139234.png)

slowa/apps.py:

```auto
from django.apps import AppConfig
class SlowaConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'slowa'

```

I’ve also tried add ‘slowa’ or ‘slowa.apps.SlowaConfig’ instead of a ‘angielski.slowa.apps.SlowaConfig’, but it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [May 16, 2022, 10:54pm UTC](https://forum.djangoproject.com/t/modulenotfounderror-sub-app/13744/2 "2022-05-16T22:54:43Z")

</div>

I believe the name in slowa/apps.py should be ‘angielski.slowa’ and not just ‘slowa’.

---

<div class="post-metadata">

**Author:** ![Kanapka12](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kanapka12/32/8532_2.png) [@Kanapka12](https://forum.djangoproject.com/u/Kanapka12)\
**Post date:** [May 16, 2022, 10:59pm UTC](https://forum.djangoproject.com/t/modulenotfounderror-sub-app/13744/3 "2022-05-16T22:59:05Z")

</div>

Yes, that’s it.  
Thank you 😃
