Open hschilling opened 7 years ago
Hmmm that is strange. Can you post the code snippet here please. What happens if you simply run the code cell with the %%nbtutor magic? Does the visualisation just not pop up?
Also if you can run the code cell with %%nbtutor --debug
and let me know if there is any traceback if will be helpful.
Thanks for the speedy response! Just something simple to try things with:
def fib(n): a,b = 1,1 for i in range(n-1): a,b = b,a+b return a print fib(5)
The visualization just doesn't pop up. So here is my notebook. I just ran the two cells.
Nothing popped up
`--------------------------------------------------------------------------- BdbQuit Traceback (most recent call last)
I'll look into this in the morning for you. For some reason the nbtutor debugger is failing and failing back to ipython to run the cell. It could possible be the 2 space indentation (instead of 4) its not happy with.
Are you able to visualize any of the examples in the repo?
Oh! I didn't even think of that. I just tried the first cell from primitives and it works fine. Will try another one with some indenting. BTW, I did try playing with the indenting in my example but it didn't help
the functions examples work too!
Cool, thanks for letting me know. I will try improve this.
In my case I was using a python2 kernel. I don't know if it happens with python3 too.
My solution was: Do not use any print statement in the code. If you do, you get the pop up saying ...
No visualization data was found for this cell. Please include the following magic at the start of the cell and run the code again %%nbtutor
I hope this helps others, as I have been banging my head for some time trying to figure out what was wrong with my installation.
Suggestion/Request: On the documentation, my lack of knowledge does not allow me to understand what is: frames, primitive objects, user namespace. I am sure you can rephrase those lines to make them a bit clearer.
Thanks to the creator of this tool. I think it is quite handy.
With print
Without print
Hi, can someone help with this error "UsageError: Line magic function %%nbtutor
not found."
giving below a brief code of what I am doing:
!jupyter nbextension enable nbtutor --py --sys-prefix
%%nbtutor -r -f
a= 1 a
Enabling notebook extension nbtutor/js/nbtutor.min...
%%nbtutor
not found.
1
using below seems to have worked for me import sys !{sys.executable} -m pip install nbtutor # this command seems to have fixed the error
%lsmagic # shows list of all line magics
test_2
%nbtutor -r -f
UsageError: Line magic function %nbtutor
not found (But cell magic %%nbtutor
exists, did you mean that instead?)
I can't seem to get any of the visualization show up. I think I am doing as shown in the screencast but it doesn't work. Plus I get this when I try to turn on Memory or Timeline. What am I doing wrong? Thanks.