Skip to content

Commit 00989be

Browse files
authored
solve the 'gbk' error in window system (#34)
In window system, uploading report will meet this error: ‘gbk’code can't decode byte oxac:illegal multibyte sequence.
1 parent a0cfe79 commit 00989be

File tree

1 file changed

+1
-1
lines changed
  • workflow/financial-report-knowledge-factory/financial_report_knowledge_factory

1 file changed

+1
-1
lines changed

workflow/financial-report-knowledge-factory/financial_report_knowledge_factory/extract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, txt_path):
2222

2323
def read_file(self):
2424
"""Read file and store data in self.all_data."""
25-
with open(self.txt_path, "r") as file:
25+
with open(self.txt_path, "r", encoding='utf-8') as file:
2626
for line in file:
2727
data = eval(line)
2828
print(data)

0 commit comments

Comments
 (0)