Skip to content

Commit 8beebfe

Browse files
committed
jupyter - only remove label when present
1 parent 4e5fec8 commit 8beebfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/resources/jupyter/notebook.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,11 @@ def nb_parameterize(nb, params):
686686
# and then re-encode it
687687
try:
688688
params_cell_yaml = parse_string("\n".join(params_cell_yaml))
689-
del params_cell_yaml['label']
689+
if "label" in params_cell_yaml:
690+
del params_cell_yaml['label']
690691
params_cell_yaml = safe_dump(params_cell_yaml).strip().splitlines()
691692
except Exception as e:
693+
sys.stderr.write(str(e) + "\naksjdfhakjsdhf\n")
692694
sys.stderr.write("\nWARNING: Invalid YAML option format in cell:\n" + "\n".join(params_cell_yaml) + "\n")
693695
sys.stderr.flush()
694696
params_cell_yaml = []

0 commit comments

Comments
 (0)