importnb Not Working on Jupyter Lab
gioarma opened this issue · comments
Hi I'm new to python and jupyter notebooks and I am trying to use this module to import a ipynb file in another ipynb file. I installed it with conda and I am running it on Jupyter Lab.
I tried to follow your readme but I have problems understanding it and I cannot even get started. In notebook 'A.ipynb' I tried to run:
from importnb import Notebook
Notebook.from_filename('*FULL_PATH*/B.ipynb')
I get the error:
type object 'Notebook' has no attribute 'from_filename'
.
I also tried with Notebook.load('*FULL_PATH*/B.ipynb')
and this time I don't get any error, but when I call a test function written in B.ipynb from A.ipynb I get an error because the function is not defined.
What am I missing?
Thank you
No luck, I still get the error 'Notebook' object has no attribute 'from_filename'
Ok thanks!
I summerize for anyone who might have this problem. What works is:
from importnb import Notebook
nb = Notebook().load('*FULL_PATH*/B.ipynb')
Then to call the function test()
within B.ipynb the code is: nb.test()