amkorousagi / Trendup

OIDC2020
0 stars 0 forks source link

한글 print 문제 #37

Closed amkorousagi closed 4 years ago

amkorousagi commented 4 years ago

print(u"category: {}".format(q.encode('utf-8'))) UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-12: ordinal not in range(128)

amkorousagi commented 4 years ago

print("keyword_title:") for i in get_keyword(item["snippet"]["title"]): print i

리스트 안에 있으면 자동으로 인코딩 해주지 않아 문제가 된다, 빼내서 하나씩 보자