Python mysql 작업 시 UnicodeEncodeError문제 해결할 때 unicode 지정하고 encode utf8로 해봤는데 잘 안 되네요...

조회수 546회
>>>result 출력값 
>>>{u'league': {u'cc': u'gb', u'id': u'94', u'name': u'\u82f1\u683c\u5170\u8d85\u7ea7\u8054\u8d5b'}, u'bet365_id': u'82381038', u'extra': {u'stadium_data': {u'city': u'Wolverhampton', u'capacity': u'30852', u'name': u'Molineux Stadium', u'country': u'England', u'googlecoords': u'52.590195,-2.131226', u'id': u'1272'}, u'home_manager': {u'cc': u'pt', u'id': u'5878', u'name': u'Nuno Espirito Santo'}, u'round': u'5', u'away_manager': {u'cc': u'gb', u'id': u'1216', u'name': u'Frank Lampard'}}, u'ss': None, u'away': {u'cc': u'gb', u'image_id': u'38', u'id': u'44000', u'name': u'\u5207\u5c14\u897f'}, u'time_status': u'0', u'time': u'1568469600', u'home': {u'cc': u'gb', u'image_id': u'3', u'id': u'17383', u'name': u'\u4f0d\u5c14\u5f17\u6c49\u666e\u987f'}, u'id': u'1644456', u'sport_id': u'1'}

>>>cursor.execute("INSERT INTO talbe ( colmun1 ) VALUES ('{}')".format(result))
>>> UnicodeEncodeError 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)

위의 result를 출력했을 때 나오는 저 딕셔너리 값을 INSERT해야하는데 어디 부분에 인코딩을 해서 넣어줘야할까요? 중문을 가져와서 하는데 인코딩에서 막혔습니다.

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)