How to Solve NameError: name 'Canvas' is not defined -- reportlab

Solution: Import the 'Canvas' module

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

from reportlab.pdfgen.canvas import Canvas

 

For more information:
Python reportlab Canvas