Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid literal for int() with base 10: 'n' during a diff operation #1490

Closed
langfield opened this issue Sep 12, 2022 · 2 comments
Closed

invalid literal for int() with base 10: 'n' during a diff operation #1490

langfield opened this issue Sep 12, 2022 · 2 comments

Comments

@langfield
Copy link
Contributor

Here is the stack trace.

ERROR:git.cmd:Pumping 'stdout' of cmd(['git', 'diff-tree', 'a31de9c31a0ee03574a34146aa1a986648ac499b', '7a62039cb6ce50e5d4c8fc412fdaf10e6f92b823', '-r', '--abbrev=40', '--full-index', '-M', '--raw', '-z', '--no-color']) failed due to: ValueError("invalid literal for int() with base 10: 'n'")
Exception in thread Thread-12:
Traceback (most recent call last):
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/cmd.py", line 114, in pump_stream
  handler(line)
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/diff.py", line 570, in <lambda>
  handle_process_output(proc, lambda byt: cls._handle_diff_line(byt, repo, index),
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/diff.py", line 557, in _handle_diff_line
  diff = Diff(repo, a_path, b_path, a_blob_id, b_blob_id, old_mode, new_mode,
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/diff.py", line 303, in __init__
  self.a_mode = mode_str_to_int(a_mode) if a_mode else None
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/objects/util.py", line 80, in mode_str_to_int
  mode += int(char) << iteration * 3
ValueError: invalid literal for int() with base 10: 'n'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/user/conda/envs/anki/lib/python3.9/threading.py", line 973, in _bootstrap_inner
  self.run()
File "/home/user/conda/envs/anki/lib/python3.9/threading.py", line 910, in run
  self._target(*self._args, **self._kwargs)
File "/home/user/conda/envs/anki/lib/python3.9/site-packages/git/cmd.py", line 120, in pump_stream
  raise CommandError([f'<{name}-pump>'] + remove_password_if_present(cmdline), ex) from ex
git.exc.CommandError: Cmd('<stdout-pump>') failed due to: ValueError('invalid literal for int() with base 10: 'n'')
  cmdline: <stdout-pump> git diff-tree a31de9c31a0ee03574a34146aa1a986648ac499b 7a62039cb6ce50e5d4c8fc412fdaf10e6f92b823 -r --abbrev=40 --full-index -M --raw -z --no-color

The output of the diff-tree command is quite large. I've attached the file.

Here is the first n characters.

:100644 100644 e193ea24d24f18261e4c9bed7d5dbe4908905501 285381444f5aa363272a46d1bdc0a01e359357db M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/appeler.md^@:100644 100644 57990a8106d7d63201397f94e29acef87e866d1f 4b8092f7edcbe559bb32ae95103972fd94be9c84 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/dessus.md^@:100644 100644 56bfcc450d7b72d505cb01a26ab515cf664ba73c 15815cec2902d8ada01a664790e60d139bb2c988 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/liste.md^@:100644 100644 cc6a20323abb94f87c03afd3b6bcaa4056816d07 e2854faca1aca70d56875a273ec2c942b27c9d31 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/main.md^@:100644 100644 807f3facd106a6b15a8d3ed8ec945c697d1f4a06 a2f19b3c9263d9f3d8c3362dee4069d47d856ce5 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/paix.md^@:100644 100644 2705188ba689d40142cde3882bebf48dcb768b13 9ac70c203b57ca2fb821a16237c95a97369f362a M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/pied.md^@:100644 100644 6b91441ac2ef63243be80ce4a5ab86d39f6835f3 634d6bf232445c32671302ec846ece2efccc2e56 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/prix.md^@:100644 100644 9438acdb6c5cd0839ac83d4c97403e97e4eb6b95 4469daa7e44f3d0c5c261efe2e24ad375bfe215f M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/sac.md^@:100644 100644 bf44f89afcf863f32d295a45e1354cfa1dbeb93c f2c16ce6afd63680553491ebe596d46460be61f6 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/sale.md^@:100644 100644 387e4b4f6ac06bb2213b128fa6ddaaa217343255 0a81cf15b4bcf37d2d70184cb4e2158cb01f10d7 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/I) French to English (Start here)/venir.md^@:100644 100644 90b427717288e2c0aed372d4357f2731957c9f02 bfbcb8ad343418c4c180d7c57c22e64cf20910ed M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/II) English to French/dix.md^@:100644 100644 54eb97e09c23dc2e1a8cdf4af5401c177d5ba311 94c6066c1958484ac9fc6fc50baed5a561ebf2b5 M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/II) English to French/tôt.md^@:100644 100644 3eac7b51aca2d18a354d5e1d4aab5944a06f292c 1341ae4d1a8ddc03234886d0871aa45e576045fa M^@5000 Most Common French Words/[1] Main Course/[a] Option 1: Parisian French Audio/II) English to French/votre.md^@:100644 100644 93b35c24f6a68ec46880f2ae25614f593ba07ada fafb69ece866c70a8b621c4863831145fd3a660a M^@5000 Most Common French Words/[1] Main Course/[b] Option 2: Canadian French Audio/I) French to English/amour.md^@:100644 100644 d942e51e9385835498d3bbafd7623f482b4e17ef 8e9cbd6be8e20b275a85b4e4bbf5dcdb4bb21555 M^@5000 Most Common French Words/[1] Main Course/[b] Option 2: Canadian French Audio/I) French to English/bras.md^@:100644 100644 1aa19ea89c7f5152bc17e093a9d14c7a5e77b9aa fc3fa653cc26c7a855436cfec8dca643951d66c1 M^@5000 Most Common French Words/[1] Main Course/[b] Option 2: Canadian French Audio/I) French to English/coin.md^@:100644 100644 7b16e6ac9a9349755f2adbe6581812ba026d1b4c bb9c3963333b4eacde2ad80fa86efb36b6f28678 M^@5000 Most Common French Words/[1] Main Course/[b] Option 2: Canadian French Audio/I) French to English/de.md^@:100644 100644 e120b665b4509f

diff-tree-out.txt

@Byron
Copy link
Member

Byron commented Sep 12, 2022

Thanks a lot! The attached diff should make a test and a fix possible.

@langfield
Copy link
Contributor Author

Fixed by #1491.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants