Internal server error after upgrade to v14 - Template/Jinja issue

Hello,

This is related to upgrading from v13.51.0 to v14 (multiple versions on v14 without any difference)
The installation is using the official frappe/erpnext docker containers and docker-compose. There is basically no deviation from the official frappe_docker instructions / no custom apps.
After upgrading and migrating, the site does not load anymore, with the following error in the backend logs:

erp-backend-1         | /usr/local/lib/python3.10/functools.py:981: UserWarning: The 'filters_config' hook used to add custom operators is not yet implemented in frappe.db.query engine. Use db_query (frappe.get_list) instead.
erp-backend-1         |   val = self.func(instance)
erp-backend-1         | [2023-06-05 13:24:50 +0000] [8] [ERROR] Error handling request /
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 18, in get_response
erp-backend-1         |     response = renderer_instance.render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 65, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 75, in application
erp-backend-1         |     response = get_response()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 27, in get_response
erp-backend-1         |     response = ErrorPage(exception=e).render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 18, in get_response
erp-backend-1         |     response = renderer_instance.render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 271, in handle
erp-backend-1         |     keepalive = self.handle_request(req, conn)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 323, in handle_request
erp-backend-1         |     respiter = self.wsgi(environ, resp.start_response)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/werkzeug/local.py", line 237, in application
erp-backend-1         |     return ClosingIterator(app(environ, start_response), self.cleanup)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 194, in application
erp-backend-1         |     resp = f(*args[:-2] + (request,))
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 84, in application
erp-backend-1         |     response = handle_exception(e)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 338, in handle_exception
erp-backend-1         |     response = get_response("message", http_status_code=http_status_code)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 27, in get_response
erp-backend-1         |     response = ErrorPage(exception=e).render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-frontend-1        | 172.18.0.6 - - [05/Jun/2023:13:24:50 +0000] "GET / HTTP/1.1" 500 141 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-redis-cache-1     | 1:M 05 Jun 2023 13:24:57.030 * 100 changes in 300 seconds. Saving...
erp-redis-cache-1     | 1:M 05 Jun 2023 13:24:57.030 * Background saving started by pid 16
erp-redis-cache-1     | 16:C 05 Jun 2023 13:24:57.052 * DB saved on disk
erp-redis-cache-1     | 16:C 05 Jun 2023 13:24:57.053 * RDB: 0 MB of memory used by copy-on-write
erp-redis-cache-1     | 1:M 05 Jun 2023 13:24:57.131 * Background saving terminated with success
erp-redis-queue-1     | 1:M 05 Jun 2023 13:28:17.014 * 100 changes in 300 seconds. Saving...
erp-redis-queue-1     | 1:M 05 Jun 2023 13:28:17.015 * Background saving started by pid 16
erp-redis-queue-1     | 16:C 05 Jun 2023 13:28:17.040 * DB saved on disk
erp-redis-queue-1     | 16:C 05 Jun 2023 13:28:17.041 * RDB: 0 MB of memory used by copy-on-write
erp-redis-queue-1     | 1:M 05 Jun 2023 13:28:17.115 * Background saving terminated with success
erp-backend-1         | /usr/local/lib/python3.10/functools.py:981: UserWarning: The 'filters_config' hook used to add custom operators is not yet implemented in frappe.db.query engine. Use db_query (frappe.get_list) instead.
erp-backend-1         |   val = self.func(instance)
erp-backend-1         | [2023-06-05 13:28:30 +0000] [7] [ERROR] Error handling request /
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 18, in get_response
erp-backend-1         |     response = renderer_instance.render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 65, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 75, in application
erp-backend-1         |     response = get_response()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 27, in get_response
erp-backend-1         |     response = ErrorPage(exception=e).render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 18, in get_response
erp-backend-1         |     response = renderer_instance.render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'
erp-backend-1         | 
erp-backend-1         | During handling of the above exception, another exception occurred:
erp-backend-1         | 
erp-backend-1         | Traceback (most recent call last):
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 271, in handle
erp-backend-1         |     keepalive = self.handle_request(req, conn)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 323, in handle_request
erp-backend-1         |     respiter = self.wsgi(environ, resp.start_response)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/werkzeug/local.py", line 237, in application
erp-backend-1         |     return ClosingIterator(app(environ, start_response), self.cleanup)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 194, in application
erp-backend-1         |     resp = f(*args[:-2] + (request,))
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 84, in application
erp-backend-1         |     response = handle_exception(e)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 338, in handle_exception
erp-backend-1         |     response = get_response("message", http_status_code=http_status_code)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 27, in get_response
erp-backend-1         |     response = ErrorPage(exception=e).render()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
erp-backend-1         |     html = self.get_html()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
erp-backend-1         |     html = func(*args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
erp-backend-1         |     html = self.render_template()
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 238, in render_template
erp-backend-1         |     html = frappe.render_template(self.source, self.context, safe_render=safe_render)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 85, in render_template
erp-backend-1         |     return get_jenv().from_string(template).render(context)
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
erp-backend-1         |     self.environment.handle_exception()
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
erp-backend-1         |     raise rewrite_traceback_stack(source=source)
erp-backend-1         |   File "<template>", line 1, in top-level template code
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
erp-backend-1         |     {% extends base_template_path %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
erp-backend-1         |     {%- block head -%}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 26, in block 'head'
erp-backend-1         |     {% include "templates/includes/head.html" %}
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/includes/head.html", line 12, in top-level template code
erp-backend-1         |     {{ include_style(link) }}
erp-backend-1         |   File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
erp-backend-1         |     return __context.call(__obj, *args, **kwargs)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 118, in include_style
erp-backend-1         |     path = bundled_asset(path)
erp-backend-1         |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 136, in bundled_asset
erp-backend-1         |     path = bundled_assets.get(path) or path
erp-backend-1         | AttributeError: 'NoneType' object has no attribute 'get'

The migration does not yield any errors.
I also tried reverting all Website settings (logo, footer etc) but that didn’t have any impact either.

Is there any idea on how I could change my installation to get v14 to work?
Thank you very much in advance!
Alex

Hello,

Does anyone have any ideas why this issue is happening after update? Any help is appreciated as I’m currently “locked out” of version 14.

Thank you

Alex

follow this guide https://github.com/frappe/frappe_docker/blob/main/docs/migrate-from-multi-image-setup.md

It has the changes required to use single image.

  • assets volumes are not mounted in containers anymore, remove the assets volume. Containers will create their own anonymous assets volume now.
  • .build file should exist under sites/.build, if not touch sites/.build

Thank you for your response @revant_one , however the installation was already migrated to use the one-image erpnext docker image.

To help other people that might run into the same issue, what solves this issue is to clean-up the containers (except for the sites volume!). After completely removing all containers and re-creating them fresh the issue went away. Just pulling the new images and running “docker compose up -d” is not enough -the containers need to be explicitly removed completely.

Alex