Open sahinakkaya opened 1 year ago
I can't reproduce your problem, for me the notebook is correctly converted. What operating system are you using and whats your neovim and python version? Does this also happen with other ipynb files?
If you want to debug this yourself, you can also go into the vim-jukit/helpers/ipynb_convert
directory and then execute the convert.py
script manually, like so:
python3 convert.py /full/path/to/Exercises.ipynb
Set breakpoints and attach a debugger in the convert.py script as needed to see where it goes wrong and why nb
doesn't contain the "nbformat" key.
I will try to debug it as you say. Thanks. Here are the output you asked for in case it helps:
❯ sw_vers
ProductName: macOS
ProductVersion: 13.2.1
BuildVersion: 22D68
❯ nvim --version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.1/share/nvim"
Run :checkhealth for more info
❯ python --version
Python 3.10.6
I am running python in a virtual env using pyenv.
Does this also happen with other ipynb files?
No, the other files are correctly converted. For example, it can convert this just fine.
Ok, I found the problem. There is a bug which only occurs if the full path to the file contains whitespace. The directory name of the notebook I shared is this:
/Users/***/GitRepos/pandas_exercises/05_Merge/Fictitous Names
When I change "Fictitous Names" to "Fictitous_Names" everything works just fine.
I am getting key error while trying to convert ipynb file to py file. The notebook file can be found here. When I examine the file, I already see a line which looks like
"nbformat": 4,
so I have no idea why it can't find the key 'nbformat'. I also tried converting it withjupyter nbconvert --to notebook --nbformat 4 <FILENAME>
but nothing has changed.