头上加入以下内容试试:

# -*- coding:utf-8
import sys
import os
reload(sys)
sys.setdefaultencoding( "utf-8" )
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'


缘由:"{0}{1}".format("中国",name),其中name是xlrd读取excel的某列中文数据,执行时抛出异常,程序终止

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2022-02-26
  • 2023-03-06
  • 2021-08-01
  • 2021-04-09
猜你喜欢
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
相关资源
相似解决方案