call the force_text function with 3 arguments: e.strerror, DEFAULT_LOCALE_ENCODING and strings_only set to boolean True.
strerror = force_text ( e . strerror , DEFAULT_LOCALE_ENCODING , strings_only = True )