I’m not sure, as I’m not using Jupyter notebooks and often saw the behavior of restarting the kernel before printing out the stack trace. I would recommend to run the script in a terminal, which will print the stack trace.