Import error while previewing the customized print format in PDF

Hi, Team
I am new to ERPNext and Frappe. I am playing around the print form builder to create a new print form for the quotation. After I adjust something in the format, While trying to preview the print format with PDF format, it shows below error, while it works in the html format preview, any hint on this?

Traceback (most recent call last):
File “apps/frappe/frappe/”, line 110, in application
response = frappe.api.handle(request)
File “apps/frappe/frappe/api/”, line 49, in handle
data = endpoint(**arguments)
File “apps/frappe/frappe/api/”, line 36, in handle_rpc_call
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 49, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 85, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1672, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/utils/”, line 31, in wrapper
return func(*args, **kwargs)
File “apps/frappe/frappe/utils/”, line 15, in download_pdf
pdf = generator.render_pdf()
File “apps/frappe/frappe/utils/”, line 112, in render_pdf
HTML, CSS = import_weasyprint()
File “apps/frappe/frappe/utils/”, line 246, in import_weasyprint
from weasyprint import CSS, HTML
ImportError: cannot import name ‘CSS’ from ‘weasyprint’ (apps/frappe/frappe/utils/