-
-
Notifications
You must be signed in to change notification settings - Fork 276
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 when running cz bump
#1110
Comments
I thought we already had this resolved in the previous fix. It looks like we are still missing a few. We probably could change it to |
Related issue: #826 |
cz bump
cz bump
Hi @Lee-W, I am grateful to you and your team for solving this problem. After testing, Here is the
And my
|
@jg40305 Thanks for helping us confirming 🙂 |
Description
Hi, I'm attempting to use commitizen in my project. When I ran the cz bump command, I encountered a
UnicodeDecodeError
and received the following error message:Upon investigating the error, I discovered that the
CHANGELOG.md
file is being opened using the system code page (cp950
in my case).commitizen\changelog_formats\base.py#L36
I suspect that the
CHANGELOG.md
contains non-English words, which is likely causing the error.Steps to reproduce
__version__.py
,.cz.toml
:__version__.py
.cz.toml
git add *
andcz commit
:cz bump
git add .gitignore
&cz commit
.gitignore
cz commit
cz bump
CHANGELOG.md
Current behavior
I adjusted the code locally:
commitizen\changelog_formats\base.py#L36
change to
and rerun
cz bump
again.This resolved the error.
CHANGELOG.md
git log
Desired behavior
I think that altering commitizen\changelog_formats\base.py#L36
is the most straightforward approach
, and it can also be configured within [tool.commitizen].However, as
BaseFormat
seems to be a core class, there could be unforeseen scenarios that prevent this approach.Screenshots
No response
Environment
3.25.0
Python 3.12.0
Windows
The text was updated successfully, but these errors were encountered: