How to Solve NameError: name 'convert' is not defined -- docx2pdf

Solution: Import the 'convert' module

To Solve the error, add the following line to the top of your code.

from docx2pdf import convert

 

For more information:
Python docx2pdf convert