How to Solve NameError: name 'sha512' is not defined -- hashlib

Solution: Import the 'sha512' module

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

from hashlib import sha512

 

For more information:
Python hashlib sha512