HDFS - Python Encoding 오류 처리
Posted 08 26, 2016 17:54, Filed under: BigData/HDP_for_HDFS> 에러 내용
File "/usr/lib/python2.6/site-packages/resource_management/core/logger.py", line 101, in filter_text text = text.replace(unprotected_string, protected_string) UnicodeDecodeError: 'ascii' codec can't decode byte 0xea in position 117: ordinal not in range(128)
> Python Default Encoding 수정
[root@peaceful ~]# vi /usr/lib/python2.6/site-packages/site.py
def __boot():
import sys, imp, os, os.path
sys.setdefaultencoding("utf-8")
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
def __boot():
import sys, imp, os, os.path
sys.setdefaultencoding("utf-8")
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
※ 위 내용은, 여러 자료를 참고하거나 제가 주관적으로 정리한 것입니다.
잘못된 정보나 보완이 필요한 부분을, 댓글 또는 메일로 보내주시면 많은 도움이 되겠습니다.
잘못된 정보나 보완이 필요한 부분을, 댓글 또는 메일로 보내주시면 많은 도움이 되겠습니다.
"BigData / HDP_for_HDFS" 분류의 다른 글
HDFS - YARN NodeManager unhealthy 오류 (0) | 2015/12/21 |
HDFS - Yarn ResourceManager, Illegal capacity 오류 (0) | 2015/12/21 |
HDFS - HDP, Ambari autoinstall 구성 모두 삭제 (0) | 2015/09/06 |
Trackback URL : http://develop.sunshiny.co.kr/trackback/1064
-
seo outsourcing services
Tracked from seo outsourcing services 12 9, 2019 02:06 DeleteLocate the pro search engine optimization consultant that is now available in addition with a great ROI today only!
-
synchronazation communication systems
Tracked from synchronazation communication systems 12 9, 2019 07:25 DeleteStart using the best school pa systems that are this week and available plus in stock now in addition reasonably priced now only!
-
find out this here
Tracked from find out this here 12 9, 2019 08:24 DeleteGet here professional social media localization currently taking on new clients in addition on sale now!