RT-thread 利用Scons 工具编译提示python编码错误解决办法

错误信息:

scons: Reading SConscript files ...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in position 9: ordinal
not in range(128):

原因:

    安装的python2.7.9版本在win8系统下的Bug,需要指定python的编码格式。

解决方法:

    1、在python 安装目录下的Lib/site-packages 文件夹下新建sitecustomize.py 脚本.

    2、在该脚本中填充:

     import sys  

     sys.setdefaultencoding('gb2312')

相关文章:

  • 2021-10-04
  • 2021-11-18
  • 2021-08-24
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
猜你喜欢
  • 2021-10-25
  • 2021-04-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-07-13
相关资源
相似解决方案