Using an exported Flow JSON file with load_flow_from_json("path/to/flow.json") returns
"UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 9465: character maps to <undefined>". Specifying the encodint type in the function helps to fix that error.
This commit is contained in:
parent
46e76c8ca4
commit
68f69e878e
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ def load_flow_from_json(path: str):
|
|||
from langflow.graph import Graph
|
||||
|
||||
"""Load flow from json file"""
|
||||
with open(path, "r") as f:
|
||||
with open(path, "r", encoding='utf-8') as f:
|
||||
flow_graph = json.load(f)
|
||||
data_graph = flow_graph["data"]
|
||||
nodes = data_graph["nodes"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue