Comment #7 on issue 1166 by takao.fujiwara1: ibus-anthy is broken? the system freezes for a few seconds
http://code.google.com/p/ibus/issues/detail?id=1166

Yes, I also noticed the setdefaultencoding issue before I added the previous comment. I guessed your python might call setdefaultencoding() from getpreferredencoding() but it seems the test file works.

File "/usr/lib/python2.7/site.py", line 162, in addpackage
exec line

Probably you could add the debug line 'print line' before 'exec line' at line 162 by manual to output the content of 'line'.

However I guess the google files(e.g. /usr/lib/python2.7/site.py) might include the line of setdefaultencoding.

I think ibus-anthy doesn't call setdefaultencoding or setappdefaultencoding directly.
Maybe I guess the problem is caused by the Arch Linux python.

generates a list of all site-packages and any broken files ("/usr/lib/python2.7/site-packages/eric4.pth") stop the IM engines from loading.

If the wrong function would be called by ibus-anthy, we could add a workaround, e.g.

try:
  any_wrapper_setdefaultencoding()
except:
  pass

But if it's called in the Arch Linux python, I think your problem could not be avoided by ibus-anthy and maybe it's not ibus-anthy specific.

If you could not find which file calls setdefaultencoding or setappdefaultencoding, you could add a line 'reload(sys)' as a workaround as your thread also explains.

Yes, ibus-anthy uses pyhton2. Now I'm checking python3.

--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en

回复