kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 95 forks source link

on some files `nbstripout` hangs #134

Closed LukaPitamic closed 1 year ago

LukaPitamic commented 4 years ago

Hi, so cool tool I must say. However out of let's say 30 ipynb files (on some a lot of times) - I experience hang from time to time, there is no error output or anything, simply:

image

any ideas where to start debugging? Or what in the ipynb could cause this?

IsabellLehmann commented 3 years ago

Hi,

I don't understand exactly what happens for you in the terminal, but maybe it is the same issue that I have.

I use Source Tree as GUI for Git. Recently, maybe since the beginning of this week, I had problems that my notebooks are somehow seen as binary files and therefore I was not able to commit single lines or blocks and also could not see my changes. As a workaround, in the notebook I can choose "Cell - All Output - Clear". If I then save the file, I can see the changes again and also commit single lines. Maybe this helps for you, too.

(Also I don't really understand this, because in the past, nbstripout was automatically discarding the output values... I mean, that's what it for.)

LukaPitamic commented 3 years ago

@IsabellLehmann I pin pointed my issue to be collapsed and collapsed tag in cells from either TOC extension or Collapsible Headings extension (or maybe even combination of both). When I updated all to newest version the problem disappeared. So the problem wasn't actually cell output, but failed validation of notebook itself by JupyterLab.

IsabellLehmann commented 3 years ago

@LukaPitamic Thank you! After updating the packages, for me it also works again. :)

kynan commented 3 years ago

Thanks for investigating @LukaPitamic @IsabellLehmann! If this issue is resolved for you both, can we close it?

IsabellLehmann commented 3 years ago

Hi @kynan it turns out that for me this is the same issue as #147. I needed some time to figure out that at least for me it was a problem with SourceTree and nbstripout, and had nothing to do with an update but only how many figure were created in the notebook...

kynan commented 3 years ago

OK, happy to leave this open for now.