Bug 694806
Summary: | [abrt] git-cola-1.4.3.1-1.fc14: core.py:36:encode:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 56: ordinal not in range(128) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Christian Jann <christian.jann> | ||||||
Component: | git-cola | Assignee: | Kevin Kofler <kevin> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 14 | CC: | davvid, kevin | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Unspecified | ||||||||
URL: | https://github.com/davvid/git-cola/issues#issue/74 | ||||||||
Whiteboard: | abrt_hash:7ab77497 | ||||||||
Fixed In Version: | git-cola-1.4.3.2-1.fc14 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-04-23 20:50:37 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 696563 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Christian Jann
2011-04-08 13:38:20 UTC
Created attachment 490795 [details]
File: backtrace
Thanks, let's track this upstream. (We can reopen this bug if upstream has a fix.) fixed in v1.4.3.2 http://cola.tuxfamily.org/releases/cola-1.4.3.2.tar.gz http://cola.tuxfamily.org/share/doc/git-cola/html/relnotes.html#git-cola-v1-4-3-2 git-cola-1.4.3.2-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/git-cola-1.4.3.2-1.fc15 git-cola-1.4.3.2-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/git-cola-1.4.3.2-1.fc14 git-cola-1.4.3.2-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/git-cola-1.4.3.2-1.fc13 https://github.com/davvid/git-cola/issues/74#issuecomment-1005518 I don't get a crash, but I see this on the command line: Traceback (most recent call last): File "/usr/share/git-cola/lib/cola/views/main.py", line 269, in _update_callback merge_msg_hash = utils.checksum(merge_msg_path) File "/usr/share/git-cola/lib/cola/utils.py", line 287, in checksum md5.update(slurp(path)) File "/usr/share/git-cola/lib/cola/utils.py", line 209, in slurp fh = open(core.encode(path)) File "/usr/share/git-cola/lib/cola/core.py", line 36, in encode return unenc.encode('utf-8', 'replace') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 56: ordinal not in range(128) git-cola --version cola version 1.4.3.2 Package git-cola-1.4.3.2-1.fc14: * should fix your issue, * was pushed to the Fedora 14 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing git-cola-1.4.3.2-1.fc14' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/git-cola-1.4.3.2-1.fc14 then log in and leave karma (feedback). Hello After teh 1.4.3.2 release Christian helped me identify more unicode-related issues. They've all been fixed in the latest github master branch. These will be released in 1.4.3.3, which hasn't happened yet. I'm going to exercise it some more this week and plan on having 1.4.3.3 released by next week. I'll post another comment here once it's available. Thanks all for your help Thanks for the status update. My plan is to go ahead with pushing 1.4.3.2 to our users for now, and to push 1.4.3.3 as another update as soon as it's ready. Are you sure that they are fixed now, less than 5 minutes ago I've done a git pull: [chris@linuxbox git-cola]$ git pull Already up-to-date. [chris@linuxbox git-cola]$ cd /home/chris/excluded/csync_Christian_Kölpin/csync/ [chris@linuxbox csync]$ /mnt/data/BUILD/git-cola/bin/git-cola Traceback (most recent call last): File "/mnt/data/BUILD/git-cola/cola/views/main.py", line 274, in _update_callback merge_msg_path) File "/mnt/data/BUILD/git-cola/cola/notification.py", line 26, in broadcast self.emit(signal, *args, **opts) File "/mnt/data/BUILD/git-cola/cola/notification.py", line 32, in emit fxn(*args, **opts) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 88, in run return self.do(signal, *args, **opts) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 97, in do ok, result = self._do(cmdobj) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 104, in _do result = cmdobj.do() File "/mnt/data/BUILD/git-cola/cola/cmds.py", line 467, in do self.model.set_commitmsg(utils.slurp(self.path)) File "/mnt/data/BUILD/git-cola/cola/utils.py", line 209, in slurp fh = open(core.encode(path)) File "/mnt/data/BUILD/git-cola/cola/core.py", line 36, in encode return unenc.encode('utf-8', 'replace') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128) [chris@linuxbox csync]$ git-cola-1.4.3.2-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. Additional testing found a few more fixes for this bug. They are available in the v1.4.3.3 tag and tarball. http://cola.tuxfamily.org/releases/cola-1.4.3.3.tar.gz 1.4.3.3 is now queued for updates-testing, see tracking bug 699123. Meanwhile, 1.4.3.2 is now queued for stable. davvid could you please test the following commands, do you see the same like I? [chris@linuxbox git-cola]$ git pull Already up-to-date. [chris@linuxbox git-cola]$ git log -n 1 commit ada59fa9521b120ed8b6a97b68c8c8a2789120ba Author: David Aguilar <davvid> Date: Sat Apr 23 00:21:14 2011 -0700 doc: Document the --prompt option and fix a typo. Signed-off-by: David Aguilar <davvid> [chris@linuxbox git-cola]$ cd .. [chris@linuxbox BUILD]$ mkdir testöüäÖÜÄß [chris@linuxbox BUILD]$ cd testöüäÖÜÄß/ [chris@linuxbox testöüäÖÜÄß]$ git init Initialized empty Git repository in /mnt/data/BUILD/testöüäÖÜÄß/.git/ [chris@linuxbox testöüäÖÜÄß]$ ../git-cola/bin/git-cola Traceback (most recent call last): File "/mnt/data/BUILD/git-cola/cola/main.py", line 232, in run model.update_status() File "/mnt/data/BUILD/git-cola/cola/models/main.py", line 306, in update_status self._update_files() File "/mnt/data/BUILD/git-cola/cola/models/main.py", line 324, in _update_files staged_only=staged_only) File "/mnt/data/BUILD/git-cola/cola/gitcmds.py", line 458, in worktree_state_dict tracked = tracked_branch() File "/mnt/data/BUILD/git-cola/cola/gitcmds.py", line 145, in tracked_branch branch = current_branch() File "/mnt/data/BUILD/git-cola/cola/gitcmds.py", line 67, in current_branch data = _read_git_head(head) File "/mnt/data/BUILD/git-cola/cola/gitcmds.py", line 90, in _read_git_head data = utils.slurp(head).rstrip() File "/mnt/data/BUILD/git-cola/cola/utils.py", line 209, in slurp fh = open(core.encode(path)) File "/mnt/data/BUILD/git-cola/cola/core.py", line 36, in encode return unenc.encode('utf-8', 'replace') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128) fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions [chris@linuxbox testöüäÖÜÄß]$ the last 6 lines are uninteresting for this bug I don't know about python but Google gives a lot about these errors http://docs.python.org/howto/unicode.html (I would try the latin-1 encoding if ascii does not work) http://stackoverflow.com/questions/447107/whats-the-difference-between-encode-decode-python-2-x http://www.daniweb.com/software-development/python/threads/258139 I don't need this bug to be fixed, but it is only a manner of time until the next will stumble upon it. Created attachment 494452 [details]
handle unicode in repo paths for the git init case
Okay, here's a patch to fix the "git init" example. The next cola release will include this.
Christian, I just pushed another fix to github. I'd like wait at least another week before creating v1.4.3.4 so that we can roll in other fixes in the meantime. Thanks for your help! YES, this fixes the last one, but I've found the next (I don't know at the moment how to get a minimal example but I will invest some more time if you need more info): [chris@linuxbox csync_Christian_Kölpin]$ cd /home/chris/excluded/csync_Christian_Kölpin/csync [chris@linuxbox csync]$ /mnt/data/BUILD/git-cola/bin/git-cola Traceback (most recent call last): File "/mnt/data/BUILD/git-cola/cola/views/main.py", line 274, in _update_callback merge_msg_path) File "/mnt/data/BUILD/git-cola/cola/notification.py", line 26, in broadcast self.emit(signal, *args, **opts) File "/mnt/data/BUILD/git-cola/cola/notification.py", line 32, in emit fxn(*args, **opts) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 88, in run return self.do(signal, *args, **opts) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 97, in do ok, result = self._do(cmdobj) File "/mnt/data/BUILD/git-cola/cola/cmdfactory.py", line 104, in _do result = cmdobj.do() File "/mnt/data/BUILD/git-cola/cola/cmds.py", line 467, in do self.model.set_commitmsg(utils.slurp(self.path)) File "/mnt/data/BUILD/git-cola/cola/utils.py", line 209, in slurp fh = open(core.encode(path)) File "/mnt/data/BUILD/git-cola/cola/core.py", line 36, in encode return unenc.encode('utf-8', 'replace') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128) git-cola-1.4.3.2-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. git-cola-1.4.3.2-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. Thanks Christian. I was able to reproduce the latest one by doing "touch .git/MERGE_MSG". I pushed a fix to github. Thanks again. After clicking around no crashes so far, I'm happy now. I think we could close this bug now. (Or keep it open for a week, just to be sure) the last of the unicode fixes were released: http://cola.tuxfamily.org/releases/cola-1.4.3.4.tar.gz http://cola.tuxfamily.org/share/doc/git-cola/html/relnotes.html#git-cola-v1-4-3-4 http://cola.tuxfamily.org/downloads.html |