mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix:when start with source code not in docker env report 'UnicodeDec… (#5802)
### What problem does this PR solve? fix:when start with source code not in docker env report "UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 5: illegal multibyte sequence" in windows ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: tangyu <1@1.com>
This commit is contained in:
@ -160,7 +160,7 @@ def add_graph_templates():
|
||||
dir = os.path.join(get_project_base_directory(), "agent", "templates")
|
||||
for fnm in os.listdir(dir):
|
||||
try:
|
||||
cnvs = json.load(open(os.path.join(dir, fnm), "r"))
|
||||
cnvs = json.load(open(os.path.join(dir, fnm), "r",encoding="utf-8"))
|
||||
try:
|
||||
CanvasTemplateService.save(**cnvs)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user