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