How to Solve NameError: name 'ImageWriter' is not defined -- barcode
Solution: Import the 'ImageWriter' module
To Solve the error, add the following line to the top of your code.
from barcode.writer import ImageWriter
For more information:
Python barcode ImageWriter