git-review crashes when using it with Python 2 (not with Python 3)

Bug #1308050 reported by Matthieu Baerts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-review
Fix Released
High
Matthieu Baerts
git-review (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello,

git-review crashes when using it with Python 2 (the default one in Ubuntu 14.04):

    $ git-review
    Traceback (most recent call last):
      File "/usr/bin/git-review", line 1196, in <module>
        main()
      File "/usr/bin/git-review", line 1182, in main
        (status, output) = run_command_status(cmd)
      File "/usr/bin/git-review", line 125, in run_command_status
        argv = shlex.split(str(argv[0]))
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 44: ordinal not in range(128)

No problem when using it with Python 3:
    $ python3 /usr/bin/git-review
    remote: Resolving deltas: 100% (14/14)
    remote: Processing changes: new: 1, refs: 1, done
    (...)

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: git-review 1.23-1
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Apr 15 14:51:18 2014
InstallationDate: Installed on 2011-08-10 (978 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
PackageArchitecture: all
SourcePackage: git-review
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Matthieu Baerts (matttbe) wrote :
Revision history for this message
Matthieu Baerts (matttbe) wrote :

This patch fixes this bug for me (tested with python 2 and python 3).

I just uploaded a new version of this package on my PPA, maybe it can be useful for someone else: https://launchpad.net/~matttbe/+archive/ppa/+build/5920430

I'm going to report this bug upstream too.

tags: added: patch
Revision history for this message
Matthieu Baerts (matttbe) wrote :

I just uploaded this patch on OpenStack's gerrit but it seems I forgot to change the topic and I can't edit it or add a new comment there... => https://review.openstack.org/#/c/88828/

Also maybe this change is also linked to this bug report: https://review.openstack.org/#/c/82826/

tags: removed: amd64
Changed in git-review:
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Matthieu Baerts (matttbe) wrote :

@Cedric: It's now fixed in the development version ;-) => https://review.openstack.org/#/c/88828/

Changed in git-review:
status: In Progress → Fix Committed
Jeremy Stanley (fungi)
Changed in git-review:
importance: Undecided → High
assignee: nobody → Matthieu Baerts (matttbe)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.