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

UnicodeDecodeError: 'charmap' codec can't decode byte #146

Closed
demberto opened this issue Oct 1, 2022 · 1 comment
Closed

UnicodeDecodeError: 'charmap' codec can't decode byte #146

demberto opened this issue Oct 1, 2022 · 1 comment

Comments

@demberto
Copy link

demberto commented Oct 1, 2022

Putting any emoji, for example 🐍 in a file pointed by [[tbump.file]] directive causes this error when trying to run tbump

> tbump 2.0.0a2
:: Bumping from 2.0.0a1 to 2.0.0a2
Traceback (most recent call last):
  File "lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "tbump.exe\__main__.py", line 7, in <module>
  File "tbump\cli.py", line 201, in main
    run(args)
  File "tbump\cli.py", line 118, in run
    bump(bump_options, operations)
  File "tbump\cli.py", line 155, in bump
    executor = Executor(new_version, file_bumper)
  File "tbump\executor.py", line 81, in __init__
    file_bumper.get_patches(new_version),
  File "tbump\file_bumper.py", line 208, in get_patches
    patches_for_request = self.compute_patches_for_change_request(
  File "tbump\file_bumper.py", line 226, in compute_patches_for_change_request
    old_lines = file_path.read_text().splitlines(keepends=False)
  File "lib\pathlib.py", line 1135, in read_text
    return f.read()
  File "encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

Have removed full path for privacy reasons

I am using tbump 6.7.0 but this issue isn't mentioned in the changelogs.

@dmerejkowsky
Copy link
Collaborator

I think this is a duplicate of #89 - closing.

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

No branches or pull requests

2 participants