Digging into that issue, nbdime finds out the filter applied on the notebook by querying the git config command. Then it applies the obtained command on the file before processing with the diff operation.
On Windows, git uses a unix shell. But nbdime with that logic uses the native shell of the OS. And in the particular case of nbstripout, it is failing.
Call from nbdime
subprocess.CalledProcessError: Command ''C:/Users/freud/Anaconda3/envs/jlab/python.exe' -m nbstripout' returned non-zero exit status 1.
Call executed directly in Windows shell:
(jlab) ...\jupyterlab-git\examples>'C:/Users/freud/Anaconda3/envs/jlab/python.exe' -m nbstripout < demo.ipynb
''C:' is not recognized as valid command
Hey,
We got an issue reported in https://github.com/jupyterlab/jupyterlab-git/issues/471#issuecomment-574326817 when using nbstripout and nbdime on Windows.
I was able to reproduce that issue on the following system:
Digging into that issue,
nbdime
finds out the filter applied on the notebook by querying thegit config
command. Then it applies the obtained command on the file before processing with the diff operation.On Windows, git uses a unix shell. But
nbdime
with that logic uses the native shell of the OS. And in the particular case of nbstripout, it is failing.Call from nbdime
Call executed directly in Windows shell:
The error raises due to the use of single quote in https://github.com/kynan/nbstripout/blob/df6a925b34b067e5ff8a01329a78c86e7f2181a3/nbstripout/_nbstripout.py#L138
Using double quote
"
removes the error.