My Python Script node has the UnicodeEncodeError after I use the CSV Reader to read a Chinese-content CSV with “UTF-8”. The output file of the CSV Reader is fine (which encode Chinese characters sucessfully). However, the Python Script cannot encode the text field in Chinese.
I even put below code in Python Script node:
import pandas as pd
data = pd.read_csv(‘…/Data/202007-08sample20%.csv’,encoding = ‘utf-8’)
however, when I executed
print (data.text) #Text is a column in the csv file, it contains Chinese in String. UnicodeEncodeError: ‘charmap’ codec can’t encode characters comes up.