Cannot install erpnext, App not in apps.txt and 'NoneType' object has no attribute 'get' internal server error

Hello, I am trying to self-host erpnext. But after getting all the images running, the backend prints the following error when called:

erpnext-backend-1  | Traceback (most recent call last):
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 18, in get_response
erpnext-backend-1  |     response = renderer_instance.render()
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/", line 78, in render
erpnext-backend-1  |     html = self.get_html()
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 510, in cache_html_decorator
erpnext-backend-1  |     html = func(*args, **kwargs)
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/", line 95, in get_html
erpnext-backend-1  |     html = self.render_template()
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/", line 232, in render_template
erpnext-backend-1  |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 85, in render_template
erpnext-backend-1  |     return get_jenv().from_string(template).render(context)
erpnext-backend-1  |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/", line 1301, in render
erpnext-backend-1  |     self.environment.handle_exception()
erpnext-backend-1  |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/", line 936, in handle_exception
erpnext-backend-1  |     raise rewrite_traceback_stack(source=source)
erpnext-backend-1  |   File "<template>", line 65, in top-level template code
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erpnext-backend-1  |     {% extends base_template_path %}
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erpnext-backend-1  |     {%- block head -%}
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 33, in block 'head'
erpnext-backend-1  |     {{ include_style('website.bundle.css') }}
erpnext-backend-1  |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/", line 393, in call
erpnext-backend-1  |     return, *args, **kwargs)
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 118, in include_style
erpnext-backend-1  |     path = bundled_asset(path)
erpnext-backend-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 136, in bundled_asset
erpnext-backend-1  |     path = bundled_assets.get(path) or path
erpnext-backend-1  | AttributeError: 'NoneType' object has no attribute 'get'

This is with the frappe/erpnext-worker:v14 image.

When trying to install erpnext into my site I get this error:

docker-compose exec backend bench --site mysite install-app erpnext
An error occurred while installing erpnext: App not in apps.txt
Traceback (most recent call last):
  File "apps/frappe/frappe/commands/", line 413, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/", line 264, in install_app
    install_app(required_app, verbose=verbose, force=force)
  File "apps/frappe/frappe/", line 270, in install_app
    raise Exception("App not in apps.txt")
Exception: App not in apps.txt

Mostly you have updated the image and container without pulling the container down.

For me pulling the container down and making it up again updated the app.txt.

You can either add erpnext to app.txt manually by bash into the container.

also refer to the following post erpnext-docker-app-is-not-in-apps-txt