# Plinth broken / django.template.exceptions.TemplateDoesNotExist: login.html

**URL:** https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847
**Category:** Hardware Owners Support
**Created:** [December 2, 2021, 12:53am UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847 "2021-12-02T00:53:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![okno](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/o/ba8739/32.png) [@okno](https://discuss.freedombox.org/u/okno)
#### Post date: [December 2, 2021, 12:53am UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847/1 "2021-12-02T00:53:10Z")

</div>

FreedomBox is plugged into home router  
Purchased on 18­Jan­21

# uname -a

Linux freedombox 5.10.0-9-armmp-lpae #1 SMP Debian 5.10.70-1 (2021-09-30) armv7l GNU/Linux

After upgrading system and re-installing freedombox, I cannot login at website freedombox.local . (( do have ssh terminal login to freedombox to fix things).  
Thanks in advance for any help fixing.

```auto
 423 cat /etc/apt/sources.list
  424 apt update
  425 apt upgrade -y
  426 vi /etc/apt/sources.list
  427 apt update
  428 apt upgrade -y
  429 dpkg --configure -a 
  430 dpkg --configure -a 
  431 history
  432 apt full-upgrade
 479 DEBIAN_FRONTEND=noninteractive apt-get install freedombox
  480 systemctl restart apache2

```

#journalctl -u plinth

```auto
Nov 29 18:04:00 freedombox sudo[4987]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=110)
...skipping...
                                                     return select_template(template, using=self.using)
                                                   File "/usr/lib/python3/dist-packages/django/template/loader.py", line 47, in select_template
                                                     raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
                                                 django.template.exceptions.TemplateDoesNotExist: login.html
Dec 01 19:38:21 freedombox /usr/bin/plinth[518]: Internal Server Error: /plinth/accounts/login/
                                                 Traceback (most recent call last):
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
                                                     response = get_response(request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 145, in _get_response
                                                     response = self.process_exception_by_middleware(e, request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 143, in _get_response
                                                     response = response.render()
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 106, in render
                                                     self.content = self.rendered_content
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 81, in rendered_content
                                                     template = self.resolve_template(self.template_name)
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 63, in resolve_template
                                                     return select_template(template, using=self.using)
                                                   File "/usr/lib/python3/dist-packages/django/template/loader.py", line 47, in select_template
                                                     raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
                                                 django.template.exceptions.TemplateDoesNotExist: login.html
Dec 01 19:39:55 freedombox /usr/bin/plinth[518]: # storage usage-info
Dec 01 19:40:06 freedombox sudo[5650]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/storage usage-info
Dec 01 19:40:06 freedombox sudo[5650]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=110)
lines 871-894/894 (END)

```

---

<div class="post-metadata">

### Author: ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)
#### Post date: [December 2, 2021, 1:14am UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847/2 "2021-12-02T01:14:50Z")

</div>

It appears that the `freedombox` package is not fully installed on the system. I recommend doing the following:

```auto
sudo apt update
sudo dpkg --configure -a
sudo apt -f install
sudo unattended-upgrades --debug
sudo reboot

```

---

<div class="post-metadata">

### Author: ![okno](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/o/ba8739/32.png) [@okno](https://discuss.freedombox.org/u/okno)
#### Post date: [December 2, 2021, 1:30am UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847/3 "2021-12-02T01:30:56Z")

</div>

Thanks for the quick response. I’ll give it a try but this will take a while as the Pioneer­FreedomBox­HSK­US hardware is rather slow.

---

<div class="post-metadata">

### Author: ![okno](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/o/ba8739/32.png) [@okno](https://discuss.freedombox.org/u/okno)
#### Post date: [December 2, 2021, 11:56pm UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847/4 "2021-12-02T23:56:13Z")

</div>

Took a long time to run, especially the last command, but didn’t fix the problem:

```auto
Nov 29 19:03:58 freedombox /usr/bin/plinth[4903]: # storage usage-info
Nov 29 19:04:01 freedombox sudo[9461]: plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/storage usage-info
Nov 29 19:04:01 freedombox sudo[9461]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=110)
Nov 29 19:04:24 freedombox sudo[9461]: pam_unix(sudo:session): session closed for user root
Nov 29 19:12:36 freedombox /usr/bin/plinth[4903]: Internal Server Error: /plinth/accounts/login/
                                                  Traceback (most recent call last):
                                                    File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
                                                      response = get_response(request)
                                                    File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 145, in _get_response
                                                      response = self.process_exception_by_middleware(e, request)
                                                    File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 143, in _get_response
...skipping...
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 81, in rendered_content
                                                     template = self.resolve_template(self.template_name)
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 63, in resolve_template
                                                     return select_template(template, using=self.using)
                                                   File "/usr/lib/python3/dist-packages/django/template/loader.py", line 47, in select_template
                                                     raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
                                                 django.template.exceptions.TemplateDoesNotExist: login.html
Dec 02 18:41:58 freedombox /usr/bin/plinth[525]: Internal Server Error: /plinth/accounts/login/
                                                 Traceback (most recent call last):
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
                                                     response = get_response(request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 145, in _get_response
                                                     response = self.process_exception_by_middleware(e, request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 143, in _get_response
                                                     response = response.render()
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 106, in render
                                                     self.content = self.rendered_content
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 81, in rendered_content
                                                     template = self.resolve_template(self.template_name)
                                                   File "/usr/lib/python3/dist-packages/django/template/response.py", line 63, in resolve_template
                                                     return select_template(template, using=self.using)
                                                   File "/usr/lib/python3/dist-packages/django/template/loader.py", line 47, in select_template
                                                     raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
                                                 django.template.exceptions.TemplateDoesNotExist: login.html

```

---

<div class="post-metadata">

### Author: ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)
#### Post date: [December 3, 2021, 6:50am UTC](https://discuss.freedombox.org/t/plinth-broken-django-template-exceptions-templatedoesnotexist-login-html/1847/5 "2021-12-03T06:50:19Z")

</div>

You also try:

```bash
sudo apt install --reinstall freedombox

```

Do you have the required template file on your system? (It comes with the freedombox package)

```bash
cat /usr/lib/python3/dist-packages/plinth/modules/sso/templates/login.html

```
