Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

UnicodeDecodeError: 'charmap' codec can't decode byte 0x98

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, python
Domain
cli, devtools

Research direction

Reproduce the failure by applying 0001-add-file.patch, 0002-some-changes-1.patch, and 0003-some-changes-2.patch, then running git-explode master^ master. Start at git_deps/detector.py in blame_hunk, where subprocess.check_output is called; done means the command handles the reported Russian-character repository without raising UnicodeDecodeError.

Written by the indexing model from the issue text.

Description

I can't run your extension. As I understand it doesn't work with russian letters. I got an error:

$ git-explode master^ master
Traceback (most recent call last):
File "C:/Users/zyrianovdv/AppData/Local/Programs/Python/Python36-32/Scripts/git-explode", line 10, in
sys.exit(run())
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_explode\cli.py", line 68, in run
main(sys.argv[1:])
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_explode\cli.py", line 64, in main
exploder.run()
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_explode\exploder.py", line 39, in run
commits, deps_from, deps_on = self.get_dependencies()
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_explode\exploder.py", line 67, in get_dependencies
detector.find_dependencies(rev)
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_deps\detector.py", line 122, in find_dependencies
self.find_dependencies_with_parent(dependent, parent)
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_deps\detector.py", line 147, in find_dependencies_with_parent
self.blame_hunk(dependent, parent, path, hunk)
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\site-packages\git_deps\detector.py", line 172, in blame_hunk
blame = subprocess.check_output(cmd, universal_newlines=True)
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\subprocess.py", line 405, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\subprocess.py", line 830, in communicate
stdout = self.stdout.read()
File "C:\users\zyrianovdv\appdata\local\programs\python\python36-32\lib\encodings\cp1251.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 348: character maps to

I created simple repository for reproduction my case. You need apply patches: 0001-add-file.patch, 0002-some-changes-1.patch, 0003-some-changes-2.patch and then git-explode master^ master for reproduction.
patches.zip

Dominant language
Python
Stars
60
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aspiers/git-explode

All issues in aspiers/git-explode

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.