Article 5G36H [SOLVED] python: UnicodeEncodeError: 'ascii' codec can't encode character

[SOLVED] python: UnicodeEncodeError: 'ascii' codec can't encode character

by
kaz2100
from LinuxQuestions.org on (#5G36H)
To whom it may concern:

System Debain amd64, python 2.7.18 (probably python3 also runs into same issue)

SituationCode:"""%s\n""" % ... is rewritten intoCode:"""{}\n""".format(...)then an errorCode:UnicodeEncodeError: 'ascii' codec can't encode character u'\...pops out.

TroubleShooting Several sites mention about environment variable, .decode() or default code setting, but not much help with me.

BingoCode:u"""{}\n""".format(...)Original script is coded by not me, so I have not investigated throughly.

Closing remark Thank you for your time. Any additional comments will be appreciated.latest?d=yIl2AUoC8zA latest?i=xXdfaNhlA_k:pL5zepcDx5w:F7zBnMy latest?i=xXdfaNhlA_k:pL5zepcDx5w:V_sGLiP latest?d=qj6IDK7rITs latest?i=xXdfaNhlA_k:pL5zepcDx5w:gIN9vFwxXdfaNhlA_k
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments