Jupyter session freeze on ROOT textual output


Using Pyroot in combination with the jupyter framework (mostly its a qtconsole I am working with) , I am struggling with same ROOT functions that send larger amount of text to stdout:

Calling e.g. TH1F::Dump or TDirectory:ls makes the system freeze and requires a restart of the jupyter ipykernel (loosing all unsaved work :cry:…). Sometimes Crtl-C helps to prevent the impending deadlock and brings up the requested information (like the directory content when ls is involved), but this is not always the case. I haven’t encountered this issue in conjunction with thePrint() function, but I wouldn’t bet on it being 100% save. In turn I would assume that TTree::Scan is also affected.

The problem is kind of mysterious and is probably not even caused by ROOT but rather by the jupyter framework (maybe related: [https://github.com/jupyter/notebook/issues/2364](http://e.g., see here)). I try to avoid calling these functions out of an interactive Pyroot session, but from time to time it still happens.

I just wanted to aks if this problem is known, If I am the only one facing it and if not, how do you deal with it?


ROOT Version: 6.14-04
Jupyter QtConsole 4.4.0
IPython 5.8.0

Our Jupyter expert, @etejedor will take a look at this once he’s back at work

Hi @phi,

Indeed, there is a limitation in the size of the output that a Jupyter notebook can handle.

Is this your case? You see that the Jupyter kernel freezes if the output of the cell is big?

A simple test with TH1F::Dump in the notebook does not show any issue. Do you have an example that is hanging in your setup?

On the other hand, I assume you are running root --notebook in your machine to spawn the Jupyter server?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.