This fixes a bug that pops up when the kernelspec that is read by myst-nb is passed as a dictionary instead of a JSON string. This seems to happen only under certain circumstances, I'm not sure when, so this PR handles both cases now:
Here's what the error was looking like:
Handler <function update_thebe_context at 0x7f2eb5effca0> for event 'doctree-resolved' threw an exception (exception: the JSON object must be str, bytes or bytearray, not dict)
This fixes a bug that pops up when the kernelspec that is read by myst-nb is passed as a dictionary instead of a JSON string. This seems to happen only under certain circumstances, I'm not sure when, so this PR handles both cases now:
Here's what the error was looking like: