将其源代码复制下来运行之后,报了下面这个错误

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 9-13: ordinal not in range(256)

后来苦思冥想找资料,最后发现一个办法,可以解决上述问题,就是:

在下图所示处加上下面箭头所指那句,即图后蓝色代码

python3 中文乱码,UnicodeEncodeError: 'latin-1' codec can't encode characters in position 10-13: ordinal not in range(256)

account = accountraw.encode("utf-8").decode("latin1")

来源:http://blog.csdn.net/u014744494/article/details/41986647

相关文章:

  • 2021-06-29
  • 2021-09-15
  • 2021-11-04
猜你喜欢
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案