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

UnicodeEncodeError when starting interactive rebase #825

Closed
Lin-Buo-Ren opened this Issue May 17, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Lin-Buo-Ren
Contributor

Lin-Buo-Ren commented May 17, 2018

Reproducible Instructions

Currently, not 100% reproducible:

  1. Open a Git repository
  2. Actions > Rebase > Start Interactive Rebase
  3. Input HEAD~1 in the "Select New Upstream" prompt and click "Interactive Rebase" button

Currently known facts:

(to-be-filled)

Traceback

  File "bin/git-xbase", line 642, in <module>
    sys.exit(main())
  File "bin/git-xbase", line 75, in main
    context = app.application_init(args)
  File "cola/app.py", line 340, in application_init
    setup_environment()
  File "cola/app.py", line 91, in setup_environment
    compat.setenv('GIT_ASKPASS', askpass)
  File "cola/compat.py", line 62, in setenv
    os.environ[key] = value
  File "/usr/lib/python2.7/os.py", line 473, in __setitem__
    putenv(key, item)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-21: ordinal not in range(128)
Could not execute editor

Additional Information

Operating System

KDE neon (Based on Ubuntu 16.04)

Locale

LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_CN
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

PATH

/home/Lin-Buo-Ren/.rvm/gems/ruby-2.4.1/bin:/home/Lin-Buo-Ren/.rvm/gems/ruby-2.4.1@global/bin:/home/Lin-Buo-Ren/.rvm/rubies/ruby-2.4.1/bin:/home/Lin-Buo-Ren/工作空間/第三方專案/vdent - Verilog Indenter - Simple indent program for Verilog source code. Trims end of line white space and indents lines based on nested depth of code blocks/bin:/home/Lin-Buo-Ren/.cargo/bin:/home/Lin-Buo-Ren/.gem/ruby/2.3.0/bin:/home/Lin-Buo-Ren/工作空間/第三方專案/iStyle - Fast and Free Automatic Formatter for Verilog Source Code/bin/release:/home/Lin-Buo-Ren/.cabal/bin:/home/Lin-Buo-Ren/軟體/go1.10.2.linux-amd64/bin:/home/Lin-Buo-Ren/軟體/BFG Repo-Cleaner:/home/Lin-Buo-Ren/bin:/home/Lin-Buo-Ren/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/Lin-Buo-Ren/.rvm/bin:/home/Lin-Buo-Ren/.rvm/bin

HOME

/home/Lin-Buo-Ren

Git Cola

3.1 (v3.1-27-g7ed05d7e)

@davvid davvid added bug i18n labels May 18, 2018

@davvid davvid closed this in d5caab1 May 18, 2018

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid May 18, 2018

Member

Thanks for the heads-up. I figured out that you also need to have your cola sandbox in a utf-8 encoded path in order to trigger the bug. It should do the right thing now -- there was a code path that could have allowed for non-encoded strings to make it through to os.environ.

Member

davvid commented May 18, 2018

Thanks for the heads-up. I figured out that you also need to have your cola sandbox in a utf-8 encoded path in order to trigger the bug. It should do the right thing now -- there was a code path that could have allowed for non-encoded strings to make it through to os.environ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment