nbimporter detects the latest nbformat version from the major version of nbformat package. Because nbformat 5.0.x does not introduce format version 5, importing fails.
ValueError: Cannot convert notebook to v5 because that version doesn't exist
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/nix/store/s87s9zbn4ddqphs2dxs57rhrdjnlb16n-python3.7-nbimporter-0.3.1/lib/python3.7/site-packages/nbimporter.py", line 75, in load_module
nb = nbformat.read(f, nb_version)
Minimal patch would be to cap supported nbformat versions at 4 with min(nb_version, 5).
I realise that this package may not be maintained anymore, but wanted to add this issue here for those facing the same error.
nbimporter detects the latest nbformat version from the major version of nbformat package. Because nbformat 5.0.x does not introduce format version 5, importing fails.
Minimal patch would be to cap supported nbformat versions at 4 with
min(nb_version, 5)
.I realise that this package may not be maintained anymore, but wanted to add this issue here for those facing the same error.