Jupyter Notebook not executing cells/code - python

For some reason today my Jupyter Notebook has decided it doesn't want to execute the code in cells. However this isn't consistent. I'll restart the kernal, it will work for a while, but then when it runs into an error it then won't execute any code in any other cells after that without a kernal restart.
I've seen a previous post on this but using jupyter troubleshoot only printed out all the packages and no useful information and I also don't appear to have nbextensions dubplicated anyway.
I'm using python 3.7.8 and Jupyter_client 6.1.6
Sorry I don't have much more information, but I'm not really sure what other information to give/look for.

What kind of errors do you mean by "when it runs into an error it then won't execute any code in any other cells after that without a kernal restart"?
I know that if you have In [*] instead of the run number of the cell for a long time probably you have an infinite loop in this cell or an open input (an input that waiting to your answer). Is this the situation?

This is a bug in Jupyter which is somehow connected to Qt, see this issue on Github
https://github.com/jupyter/notebook/issues/6526
It is probably rare...

Related

what to do if jupyter notebook hangs and does not allow me to undo the previous changes that caused memory issues?

I have previously been using jupyter notebook normally without any issue until when I tried to run a code intending to display a big dataframe (without knowledge that I could run out of memory). this suddenly crashed my jupyter notebook to the level if re-start it using anaconda, as I used to, it crashes telling me that I went out memory.
I have no idea how I can atleast undo the recent changes to the notebook so that it be back to then normal previous stage.
Can anyone help with what in this frustrating situation? thank you in advance!

Jupyter notebook kernel keeps dying (no anaconda, ubuntu, cpu)

I setup jupyter notebook on a server(Ubunutu) to run but every 20-30min the kernel just dies and tries to restart.
I already googeled but I don't use anaconda, I don't get any specific error and it doesn't look like a specific function which fails so most 'solutions' do not apply to my case it seems.
The code runs on cpu.
However the code does work on my local machine (windows) running on gpu.
I also run the notebook with --debugger but I don't get any error it just says reconnect out of nowhere :(
Has anyone of you encountered a similar problem? It is hard to figure out what is going on without having any error messages :/
Thanks for your help!

Jupyter Running Wrong Cell in VSCode

I'm using the Jupyter extension on VSCode, Windows 10. I'm using Python through Anaconda.
I'm using a jupyter notebook and am running several different cells. After I run some of the cells a few times and restart the kernel a few times (to allow modules that I edited to update for the notebook), the notebook eventually stops running the correct cell. No matter what cell I try to run, it always runs the same cell, which is directly below my most used cell/the cell I used last. Opening and closing VSCode works but is only a temporary solution, and the issue has been arising more often. Does anyone know how to fix this?

PyCharm - how do I debug (like in Jupyter Notebook) without having to re-run the full script every-time that I modify code?

I'm new to coding and to PyCharm. I've learned with Jupyter and trying to get my head around PyCharm debugging (using single/multiple breakpoints).
What I liked about Jupyter is that when you put your code into different blocks, run them to output lists which you'll then be working with (the lists - as long as you haven't done anything to permanently affect them, but in that case, I would do new_list = og_list.copy() and play with the new list, to avoid re-running all of the code above) to create/test your next lines of codes, I can't figure out a way to proceed in the same way into PyCharm/Debugging.
In PyCharm, the way that I am using it, it seems that every time that I am changing a line of code to re-test/debug, I need to run the full code once again. I know I must be doing it wrong. I've played a few videos now and read a few posts online but I still can't seem to get it. Anyone here available to help?
Are you aware that you could write jupyter notebooks in PyCharm? - The cell functionality of jupyter notebook is only given in jupyter notebook and ipython as far as I know.
You may also open a iPython-shell in PyCharm.
Also, remember that you can easily convert a jupyter notebook to a .py-File, so nothings prevents you from writing code in jupyter notebook.

IdeaVim with Jupyter Notebook on PyCharm

I am trying out IntelliJ. I have installed the Python plugin, and IdeaVim.
I cannot navigate properly across Jupyter Notebook cells using hj. I mean, on normal mode, I cannot go to the next (or previous) cell, even if there is one, using hj.
Is there a way to do it without the mouse, possibly rebindable? I have read the tutorial and tried to find something in the program, but could not.
Ideavim plugin doesn't seem to support Pycharm's notebook implementation as of right now :(
There's an open issue marked as "bug" on Ideavim's issue tracker that was opened back in 2015 and it seems like it doesn't have any progress made since.
However according to the comment in the issue thread you can:
funny way to get into the command mode is type something so that the suggestion panel appears, now press "esc" you will get into Vim command mode
So this might indicate that this could be solved and updated in the future.
As an alternative you can try out jupyter-vim-binding, however it doesn't work with Pycharm either.

Categories