Skip to content
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

engine.py中179行的报错 #31

Open
GoogleCodeExporter opened this issue Apr 29, 2015 · 0 comments
Open

engine.py中179行的报错 #31

GoogleCodeExporter opened this issue Apr 29, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.使用golang语言编译一个go-gtk的界面程序(比如go-gtk的示例程
序)
2.googlepinyin切换为英文模式
3.输入字符后回车,会提示错误

What is the expected output? What do you see instead?

(setargs:3850): IBUS-WARNING **: Process Key Event failed: 
GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code36: 
GDBus.Error:org.freedesktop.DBus.Python.ValueError: Traceback (most recent call 
last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/ibus/engine.py", line 188, in ProcessKeyEvent
    return self.__engine.process_key_event(keyval, keycode, state)
  File "/usr/share/ibus-googlepinyin/engine.py", line 179, in process_key_event
    if ascii.isprint(chr(keyval)) and self.__full_width_letter[self.__mode] :
ValueError: chr() arg not in range(256)

What version of the product are you using? On what operating system?

Ubuntu 12.04 ;ibus 1.4.1 ;ibus-googlepinyin 0.1.1+hg20111212-1

Please provide any additional information below.

if ascii.isprint(chr(keyval)) and self.__full_width_letter[self.__mode] :
修改为:
if keyval<256 and ascii.isprint(chr(keyval)) and 
self.__full_width_letter[self.__mode] :

Original issue reported on code.google.com by [email protected] on 7 Jun 2012 at 6:17

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

No branches or pull requests

1 participant