This attach print does not work properly.
Can you please help out in resolving the same?
Below is the error message appears while sending the email -
Queue / Worker Job Created
home-frappe-frappe-bench:short
<function send_workflow_action_email at 0x7fcf9a707430>
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py”, line 17, in get_response
response = renderer_instance.render()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py”, line 61, in render
html = self.get_html()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py”, line 445, in cache_html_decorator
html = func(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py”, line 78, in get_html
html = self.render_template()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py”, line 212, in render_template
html = frappe.render_template(self.source, self.context, safe_render=safe_render)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 80, in render_template
return get_jenv().from_string(template).render(context)
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/environment.py”, line 1291, in render
self.environment.handle_exception()
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/environment.py”, line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 8, in top-level template code
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/sandbox.py”, line 393, in call
return __context.call(__obj, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py”, line 84, in include_style
path = bundled_asset(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py”, line 96, in bundled_asset
path = bundled_assets.get(path) or path
AttributeError: ‘NoneType’ object has no attribute ‘get’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 1013, in perform_job
rv = job.perform()
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/job.py", line 709, in perform
self._result = self._execute()
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/job.py", line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 117, in execute_job
method(**kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/workflow/doctype/workflow_action/workflow_action.py", line 293, in send_workflow_action_email
common_args = get_common_email_args(doc)
File "/home/frappe/frappe-bench/apps/frappe/frappe/workflow/doctype/workflow_action/workflow_action.py", line 391, in get_common_email_args
'attachments': [frappe.attach_print(doctype, docname, file_name=docname, doc=doc)],
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1608, in attach_print
content = get_print(doctype, name, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1571, in get_print
html = get_response_content("printview")
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 28, in get_response_content
response = get_response(path, http_status_code)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 23, in get_response
response = ErrorPage(exception=e).render()
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 61, in render
html = self.get_html()
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py", line 445, in cache_html_decorator
html = func(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 78, in get_html
html = self.render_template()
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 212, in render_template
html = frappe.render_template(self.source, self.context, safe_render=safe_render)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py", line 80, in render_template
return get_jenv().from_string(template).render(context)
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/web.html", line 1, in top-level template code
{% extends base_template_path %}
File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 25, in top-level template code
{%- block head -%}
File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/base.html", line 33, in block 'head'
{{ include_style('website.bundle.css') }}
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/jinja2/sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 84, in include_style
path = bundled_asset(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja_globals.py", line 96, in bundled_asset
path = bundled_assets.get(path) or path
AttributeError: 'NoneType' object has no attribute 'get'