'charmap' codec can't encode character '\uf0b7' in position 0: code example
Example: charmap' codec can't encode character '\u010d' in position 97: character maps to
import io
with io.open(fname, "w", encoding="utf-8") as f:
f.write(html)
import io
with io.open(fname, "w", encoding="utf-8") as f:
f.write(html)