Skip to content

UnicodeDecodeError: 'gbk' codec can't decode:  #89

@ffreemt

Description

@ffreemt
...
   change_request
  File "c:\path-to-project-folder\.venv\lib\site-packages\tbump\file_bumper.py", line 219, in compute_patches_for_change_request
    old_lines = file_path.read_text().splitlines(keepends=False)
File "C:\Python\Python37\lib\pathlib.py", line 1222, in read_text
    return f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 118: illegal multibyte sequence

A simple patch in file_bumper.py", line 219 fixes the problem:
file_path.read_text() -> file_path.read_text("utf8")

It would be nice if the next version adds this "utf8".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions