Open ZeroDevNull opened 10 months ago
Well, this is a bug, but these files are huge, and almost every single item has changed, so it's practically impossible to debug this. There are 550 actions before the one that fails, and to figure out why this one fails, I would have to step through all of them and see how they affect the state of the tree to figure out what goes wrong, because it's somewhere in the preceding 550 actions.
If you can make a smaller case with a similar error that could be helpful.
Also, the diffs are larger than the original file, so I'm not sure what the purpose of diffing and patching is in this case.
Hello, I have a similar problem, this is my error message, is it equivalent?
File "/venv/lib/python3.8/site-packages/xmldiff/main.py", line 50, in diff_files
return _diff(etree.parse, left, right,
File "/venv/lib/python3.8/site-packages/xmldiff/main.py", line 38, in _diff
return diff_trees(left_tree, right_tree, diff_options=diff_options,
File "/venv/lib/python3.8/site-packages/xmldiff/main.py", line 30, in diff_trees
return formatter.format(diffs, left)
File "/venv/lib/python3.8/site-packages/xmldiff/formatting.py", line 717, in format
actions.extend(self.handle_action(action, orig_tree))
File "/venv/lib/python3.8/site-packages/xmldiff/formatting.py", line 727, in handle_action
for item in method(action, orig_tree):
File "/venv/lib/python3.8/site-packages/xmldiff/formatting.py", line 758, in _handle_MoveNode
node = orig_tree.xpath(action.node)[0]
IndexError: list index out of range
No, but it may be related. Again, if someone could make a smaller example where this happens I should have time to look at it.
OS: Ubuntu 20.04 XMLDIFF version: 2.4/2.6.3
When I diff these two files I get the following error:
The commands I run are: xmldiff cfgspawnabletypes1.xml cfgspawnabletypes2.xml > cfgspawnabletypes.diff xmlpatch cfgspawnabletypes.diff cfgspawnabletypes1.xml
The exact files used: xmltest.zip
I've tried to remove all whitepaces and comments but that didn't work.