Closed dereklieu closed 5 years ago
Thanks for flagging! Can you share a minimal notebook that raises this exception?
I've pasted such a file below. Using your preview site, the file will not generate anything as-is. If I add metadata: {}
to the root object then it generates the heading as it should.
I don't know if it's common for most notebook authoring programs not to include at least an empty metadata
object, but I'm working with some here that don't so it's certainly possible!
{
"cells": [
{
"level": 1,
"source": [
"Demo of mpld3 (Updated!)"
],
"metadata": {},
"cell_type": "heading"
}
]
}
Thanks! Fixed in v0.4.2, now available on master
and on npm.
First: very cool library!
I've found that this line throws an exception when the
metadata
object does not exist. Since metadata properties are all optional, I imagine there are other instances of notebooks in the wild that don't have this property set to an empty{}
.Might be good to check that
metadata
is accessible to guard against throwing the exception in these cases.Thanks!