-1

I run a sql in hue:

insert into Student values('01' , '赵雷' , '1990-01-01' , '男');

hue show: 'charmap' codec can't encode characters in position 35-36: character maps to

hue execption

when i run :

select * from mydb.Student 

hue show

I try set hue.ini -> [desktop] ->default_site_encoding=utf-8 but it doesn't work.

and i try : /usr/lib/python2.7/site-packages vim sitecustomize.py

# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')

my python version is 2.7.5 restart hue, it doesn't work.

help! thks.

zohar163
  • 1
  • 1
  • Please just search for that error message online. As a new user here, please also take the [tour] and read [ask]. Also, don't post images of text, post the text instead. – Ulrich Eckhardt Nov 17 '20 at 07:49
  • Does this answer your question? [UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)](https://stackoverflow.com/questions/9942594/unicodeencodeerror-ascii-codec-cant-encode-character-u-xa0-in-position-20) – Ulrich Eckhardt Nov 17 '20 at 07:50

1 Answers1

0

hue version is 4.8.0

mysql version is 5.7 create table sql:

CREATE TABLE `Student` (
  `s_id` VARCHAR(20) NOT NULL,
  `s_name` VARCHAR(20) NOT NULL DEFAULT '',
  `s_birth` VARCHAR(20) NOT NULL DEFAULT '',
  `s_sex` VARCHAR(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`s_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8
zohar163
  • 1
  • 1