V14 PDF not working

After installing V14, everything seems to work well until I try to generate a PDF for an invoice. Sometimes it just displays the body without a letterhead.
Of late it now gives me this error
Traceback (most recent call last):
File “apps/frappe/frappe/handler.py”, line 72, in execute_cmd
method = get_attr(cmd)
File “apps/frappe/frappe/handler.py”, line 258, in get_attr
method = frappe.get_attr(cmd)
File “apps/frappe/frappe/init.py”, line 1575, in get_attr
if isinstance(path, str):
File “apps/frappe/frappe/init.py”, line 1323, in get_module
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “apps/frappe/frappe/utils/print_format.py”, line 8, in
from frappe.translate import print_language
ImportError: cannot import name ‘print_language’ from ‘frappe.translate’ (apps/frappe/frappe/translate.py)

Your workers may not have restarted correctly. If bench restart errored, you can reload workers with the supervisorctl interface.

http://supervisord.org/running.html#supervisorctl-actions

I encountered this also displays the body without a letterhead.
This link helps me remove and install correct version wkhtmltopdf

Try this first in your test machine if works fine :slight_smile: RUN root as user

sudo apt-get remove wkhtmltopdf
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
apt --fix-broken install
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
apt-get -f install

1 Like