임 tweepy의 기능 "update_profile_background_image"를 사용하려고 시도하는 오류를 얻고있다 :UnicodeDecodeError (tweepy)
Traceback (most recent call last):
File "XXX.py", line 1401, in <module>
psn_card.gen_twitter_bg(user_db)
File "XXX.py", line 972, in gen_twitter_bg
auth_api.update_profile_background_image(file)
File "build/bdist.linux-x86_64/egg/tweepy/api.py", line 346, in update_profile_background_image
headers, post_data = API._pack_image(filename, 800)
File "build/bdist.linux-x86_64/egg/tweepy/api.py", line 729, in _pack_image
body = '\r\n'.join(body)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128)
문제는이 LIB 내가이 문제를 해결하는 방법, 계란 파일 내부에 ? 이 버그는 tweepy의 버그입니까?
이 기능은 파일 (이미지)을 읽고 POST (HTTP)를 통해 트위터 API에 보냅니다.
로드 된 이미지를 조작하려고 할 때 오류가 발생합니다.
# -- coding: utf-8 --
자세한 내용을 확인하십시오. update_profile_background_image() 호출은 어떻게 생겼습니까? 오류가있을 수 있습니다. 아직 알 수 없습니다. – naeg
일반 링크 : http://docs.python.org/howto/unicode.html – Carpetsmoker