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
git-cola crash in openSUSE Tumbleweed #969
Comments
My system language is Simplified Chinese and this error is an encoding error of |
hmm can you clone a copy of the repo down and edit
that can help hone in on a workaround. This is odd because that bit of code has been stable for a very long time, so there might be a subtle issue going on. I'm assuming you're running python2. If it's possible to get a python3 PyQt5 installed then that might be an interesting experiment to see if it's well-behaved there. A candidate solution is to add:
right before the line with the error and it should make the errors go away. The only reason that's weird is because, on python2, gettext.ugettext should already be returning a unicode string, and thus It's surprising. Is your encoding not utf-8, btw? I'm assuming it is zh_CN.utf8 which should work fine. |
I went ahead and optimistically added the |
My system has Python 2 as default. Just tested with master: python3 bin/git-cola # works
python2 bin/git-cola # crashes |
It is strange that I cannot find any description about |
Yeah, back in the python2 days the regular In python3 that changed -- Our code tries to get python2 to behave roughly like python3, and we use unicode strings everywhere internally. When touching parts of the outside, we encode to utf-8 as needed, and use compat wrappers to paper over the 2 vs. 3 differences where one version might need encoding (or decoding), and the other doesn't. The frozenset error is super curious -- it's behaving like it has a unicode string and wants to encode it, and the ascii encoder is not sufficient. The reason it's curious is because the arguments to the Anyways, let me know if you have any other clues. i18n and translations are a very important aspect so I appreciate the help. |
I searched 'utf-8' throughout the code base and found many files have specified 'utf-8' in some way:
Maybe this has something to do with the Unicode. |
git-cola 3.4
Operating System: openSUSE Tumbleweed 20190716
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.13.0
Kernel Version: 5.1.16-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 31.2 GiB
The text was updated successfully, but these errors were encountered: