+12

can't build/run python script if there is unicode character in the patch

Leszek Tarkowski 9 years ago updated by nhwind 8 years ago 2
at least on Ubuntu 64bit 10.04.1 LTS.

in console:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 230, in run_
    return self.run(**args)
  File "./exec.py", line 98, in run
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0107' in position 44: ordinal not in range(128)

How to reproduce:
create python scipt in path with unicode character. Press F7. Look at console output

Same here, except in build 2127 the lines are different:
Traceback (most recent call last):
  File "./sublime_plugin.py", line 257, in run_
  File "./exec.py", line 124, in run
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0173' in position 71: ordinal not in range(128)

+1 vote


 Work-around:


 murphyslaw solved this. See https://github.com/misfo/Shell-Turtlestein/issues/6


Changed my ~/.config/sublime-text-2/Packages/Default/exec.py accordenly - and it did the trick.