No documents created with email

Having issues with emails and attaching the document with V14 on docker based installation

3 entries in the error log:
printview failed
Traceback with variables (most recent call last):
File “apps/frappe/frappe/website/”, line 18, in get_response …

Email sending failed
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/”, line 134, in send
message = ctx.build_message(recipient.recipient)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/”, line 293, in build_message
message = self.include_attachments(message)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/”, line 356, in include_attachments
print_format_file = frappe.attach_print(**attachment)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 2059, in attach_print
content = get_print(doctype, name, **kwargs) …

Traceback with variables (most recent call last):
File “apps/frappe/frappe/utils/”, line 147, in execute_job …

How can this get fixed?

I can’t do emails with attached document:

printview failed:

Traceback with variables (most recent call last):
  File "apps/frappe/frappe/website/", line 18, in get_response
    response = renderer_instance.render()
      path = 'printview'
      http_status_code = 200
      response = None
      endpoint = 'printview'
      path_resolver = < object at 0x7f01149093c0>
      renderer_instance = < object at 0x7f0114908d00>
      e = AttributeError("'NoneType' object has no attribute 'get'")
  File "apps/frappe/frappe/website/page_renderers/", line 78, in render
    html = self.get_html()
      self = < object at 0x7f0114908d00>
  File "apps/frappe/frappe/website/", line 510, in cache_html_decorator
    html = func(*args, **kwargs)
      args = (< object at 0x7f0114908d00>,)
      kwargs = {}
      html = None
      page_cache = None
      func = <function TemplatePage.get_html at 0x7f0115478670>
  File "apps/frappe/frappe/website/page_renderers/", line 95, in get_html
    html = self.render_template()
      self = < object at 0x7f0114908d00>
  File "apps/frappe/frappe/website/page_renderers/", line 232, in render_template
    html = frappe.render_template(self.source, self.context, safe_render=safe_render)
      self = < object at 0x7f0114908d00>
      safe_render = True
  File "apps/frappe/frappe/utils/", line 85, in render_template
    return get_jenv().from_string(template).render(context) ...
  File "env/lib/python3.10/site-packages/jinja2/", line 393, in call
    return, *args, **kwargs)
      _SandboxedEnvironment__self = <jinja2.sandbox.SandboxedEnvironment object at 0x7f010fe2beb0>
      _SandboxedEnvironment__context = ...
      _SandboxedEnvironment__obj = <function include_style at 0x7f01149ac8b0>
      args = ('print.bundle.css',)
      kwargs = {}
      fmt = None
  File "apps/frappe/frappe/utils/", line 118, in include_style
    path = bundled_asset(path)
      path = 'print.bundle.css'
      rtl = None
      preload = True
  File "apps/frappe/frappe/utils/", line 136, in bundled_asset
    path = bundled_assets.get(path) or path
      path = 'print.bundle.css'
      rtl = None
      get_assets_json = <function get_assets_json at 0x7f0118791240>
      abs_url = <function abs_url at 0x7f0115cf9360>
      bundled_assets = None
builtins.AttributeError: 'NoneType' object has no attribute 'get'

Anyone can help here?

Issue was, that the docker worker containers did not have mounted the assets volume.

I seem to be running into the same issue. What did you have to do to get the assets directory to mount properly in the worker containers? It’s mounted in gunicorn but not the workers.

In my compose file I added the volume to the workers:

    - bench
    - worker
    - --queue
    - default
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v14
      default: null
    - type: volume
      source: sites
      target: /home/frappe/frappe-bench/sites
      volume: {}
    - type: volume
      source: assets
      target: /home/frappe/frappe-bench/sites/assets
      read_only: true
      volume: {}


    name: frappe_docker_assets
    name: frappe_docker_db-data
    name: frappe_docker_redis-data
    name: frappe_docker_sites
    name: frappe_docker_nginx