Parsing error crash.
This commit is contained in:
parent
bfb13f5eee
commit
48fcc5b777
|
@ -374,6 +374,7 @@ def validate_prompt(prompt):
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
valid = False
|
valid = False
|
||||||
reason = "Parsing error"
|
reason = "Parsing error"
|
||||||
|
node_id = None
|
||||||
|
|
||||||
if valid == True:
|
if valid == True:
|
||||||
good_outputs.add(o)
|
good_outputs.add(o)
|
||||||
|
@ -381,9 +382,10 @@ def validate_prompt(prompt):
|
||||||
print("Failed to validate prompt for output {} {}".format(o, reason))
|
print("Failed to validate prompt for output {} {}".format(o, reason))
|
||||||
print("output will be ignored")
|
print("output will be ignored")
|
||||||
errors += [(o, reason)]
|
errors += [(o, reason)]
|
||||||
if node_id not in node_errors:
|
if node_id is not None:
|
||||||
node_errors[node_id] = {"message": reason, "dependent_outputs": []}
|
if node_id not in node_errors:
|
||||||
node_errors[node_id]["dependent_outputs"].append(o)
|
node_errors[node_id] = {"message": reason, "dependent_outputs": []}
|
||||||
|
node_errors[node_id]["dependent_outputs"].append(o)
|
||||||
|
|
||||||
if len(good_outputs) == 0:
|
if len(good_outputs) == 0:
|
||||||
errors_list = "\n".join(set(map(lambda a: "{}".format(a[1]), errors)))
|
errors_list = "\n".join(set(map(lambda a: "{}".format(a[1]), errors)))
|
||||||
|
|
Loading…
Reference in New Issue