How to Solve NameError: name 'string_types' is not defined -- six

Solution: Import the 'string_types' module

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

from six import string_types

 

For more information:
Python six string_types