How to fix UnicodeEncodeError: 'utf-8' codec can't encode character: surrogates not allowed in Python | DevErrors