allinaigc commited on
Commit
576821c
1 Parent(s): f8716a2

Upload st_data_parser.py

Browse files
Files changed (1) hide show
  1. st_data_parser.py +1 -1
st_data_parser.py CHANGED
@@ -81,7 +81,7 @@ def parser(file):
81
  ### 本质上txt文件和json文件的处理方式是一样的。
82
  txt_file = file.getvalue() ## 在streamlit中获得上传文件的json文件内容。这里不能用file.read().
83
  # txt_file = txt_file.decode('utf-8') ### working.
84
- txt_file = txt_file.encode('utf-8')
85
 
86
  ## 保障是utf-8的格式
87
  # with open(file.name, 'r', encoding='utf-8') as f:
 
81
  ### 本质上txt文件和json文件的处理方式是一样的。
82
  txt_file = file.getvalue() ## 在streamlit中获得上传文件的json文件内容。这里不能用file.read().
83
  # txt_file = txt_file.decode('utf-8') ### working.
84
+ txt_file = txt_file.decode('utf-8')
85
 
86
  ## 保障是utf-8的格式
87
  # with open(file.name, 'r', encoding='utf-8') as f: