nbdime
nbdime copied to clipboard
Mergetool doesn't load: "cannot have null base deleted cell"
Hi, all. We're having a project with four people working on the same notebook, and use nbdime extensively. Every now and then, the mergetool just doesn't work. The page hangs in its loading state: The spinner goes on and on. ~The only choice left for us is then to manually copy the code over from one branch to the other.~ (see below)
The web console gives me the following:
Assertion failed: cell.ts:486:68
Error: Invalid merge decision, cannot have null base for deleted cell: [object Object] cell.ts:491:12
We exclusively use nbdime for merging. I am currently on a feature branch, merging master into it (to prepare for merge back into master, we're not using rebase in this case).
Following is the IPython.sys_info() output:
$ python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '2eec187d3',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/*snip*/anaconda3/envs/<envname>/lib/python3.7/site-packages/IPython',
'ipython_version': '7.9.0',
'os_name': 'posix',
'platform': 'Darwin-18.6.0-x86_64-i386-64bit',
'sys_executable': '/*snip*/anaconda3/envs/<envname>/bin/python',
'sys_platform': 'darwin',
'sys_version': '3.7.4 (default, Aug 13 2019, 15:17:50) \n'
'[Clang 4.0.1 (tags/RELEASE_401/final)]'}
Unfortunately, I can't create a minimal example of this at the moment, I'm not sure when this happens myself.
For clarification: when you say mergetool, you mean the web tool solving conflicts from git? If so: you should be able to open up the conflicted notebook directly for some smart manual conflict resolution (in-line conflict markers).
(noting this as a workaround, but please share a reproducible case when you find one)
For clarification: when you say mergetool, you mean the web tool solving conflicts from git? If so: you should be able to open up the conflicted notebook directly for some smart manual conflict resolution (in-line conflict markers).
yes, exactly. Interestingly, the web-diff always works. Only the merge tool doesn't run.
you should be able to open up the conflicted notebook directly for some smart manual conflict resolution (in-line conflict markers)
thank you, I wasn't aware these aren't just some merge artifacts, but actual jupyter-friendly indicators made for manual merging :)
Closing for now, but if anyone is able to create a reproducible example, please comment and I will reopen.
Hello, I was able to reproduce this (3.0.0b1 and 2.1.0). There are three files in the attached archive - o.ipynb (base), a.ipynb (local), b.ipynb (remote).
When running nbmerge-web o.ipynb a.ipynb b.ipynb --out out.ipynb, browser (firefox 86.0) doesn't show notebooks content and web console shows the following error:
Assertion failed: cell.ts:490:16
Uncaught (in promise) Error: Invalid merge decision, cannot have null base for deleted cell: [object Object]
applyCellLevelDecision cell.ts:493
processDecisions cell.ts:366
f cell.ts:132
buildCellList notebook.ts:235
<anonymous> notebook.ts:90
_ merge.ts:76
_ merge.ts:166
cell.ts:493:16
Basically these notebooks differ only in source content and number of cells:
o.ipynb:
[
{"source": "AAA\n"},
]
a.ipynb:
[
{"source": "BBB\n"},
{"source": "AAA\n"}
]
b.ipynb:
[
{"source": "AAA\nCCC\n"}
]