在同步时一直跳默认编码错误不支持
Exception in thread Thread-177:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 79: ordinal not in range(128)
两种修改方式
/usr/local/lib/python2.7/site-packages# cat sitecustomize.py
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
也可以在命令行中执行python
import sys
reload(sys)
sys.setdefaultencoding('utf8')
这样也可以。