Bug 1072940

Summary: Left Shift stopped work for ibus-table-1.5.0.20140218-1.fc20.noarch
Product: [Fedora] Fedora Reporter: Daniel <danielsun3164>
Component: ibus-tableAssignee: Mike FABIAN <mfabian>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: dchen, i18n-bugs, K9, kent.neo, mfabian, pwu, shawn.p.huang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ibus-table-1.5.0.20140312-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-02 09:25:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
0001-use-editor.commit_to_preedit-instead-of-deleted-edit.patch
none
0002-Don-t-try-to-set-_prev_char-in-commit_string-when-an.patch
none
ibus-table-pharse-pharse-fail.png none

Description Daniel 2014-03-05 12:39:57 UTC
Description of problem:
After update to ibus-table-1.5.0.20140218-1.fc20.noarch, Left Shift stopped work for me.

Version-Release number of selected component (if applicable):
$ rpm -q ibus-table
ibus-table-1.5.0.20140218-1.fc20.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. Start a input method using ibus-table(ex. ibus-table-chinese-wubi-jidian).
2. Input "a" key, then click "left shift" key.
3. nothing happens.

Actual results:
1. Nothing happens when click "left shift" key.
2. The following error log can be found in ~/.ibus/table/debug.log

AttributeError: 'editor' object has no attribute 'l_shift'
Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/table.py", line 1570, in do_process_key_event
    result = self._process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1592, in _process_key_event
    return self._table_mode_process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1646, in _table_mode_process_key_event
    res = self._editor.l_shift ()

Expected results:
"Left Shift" key is the hot key to create new phrase. I expect to create new phrase by clicking "left shift".

Comment 1 Mike FABIAN 2014-03-05 15:10:26 UTC
This seems to be the commit which broke it:

https://github.com/kaio/ibus-table/commit/fb11d92439fe4bd55fcad480d3998a17434f6870

Comment 2 Mike FABIAN 2014-03-05 15:40:21 UTC
Created attachment 871040 [details]
0001-use-editor.commit_to_preedit-instead-of-deleted-edit.patch

Patch to fix the problem.

Comment 3 Mike FABIAN 2014-03-05 15:41:52 UTC
Created attachment 871041 [details]
0002-Don-t-try-to-set-_prev_char-in-commit_string-when-an.patch

Another patch to fix a problem which existed already in 
ibus-table-1.5.0.20130419-3.fc20.noarch.

Comment 4 Fedora Update System 2014-03-06 15:00:36 UTC
ibus-table-1.5.0.20140306-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140306-1.fc19

Comment 5 Fedora Update System 2014-03-06 15:01:42 UTC
ibus-table-1.5.0.20140306-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140306-1.fc20

Comment 6 Fedora Update System 2014-03-07 06:26:13 UTC
Package ibus-table-1.5.0.20140306-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ibus-table-1.5.0.20140306-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3514/ibus-table-1.5.0.20140306-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-03-11 20:06:26 UTC
ibus-table-1.5.0.20140311-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140311-1.fc19

Comment 8 Fedora Update System 2014-03-11 20:07:39 UTC
ibus-table-1.5.0.20140311-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140311-1.fc20

Comment 9 Mike FABIAN 2014-03-11 20:12:23 UTC
Daniel, the update from comment#8 should fix the regression you found
in:

https://admin.fedoraproject.org/updates/FEDORA-2014-3514/ibus-table-1.5.0.20140306-1.fc20

 danielsun - 2014-03-10 08:20:15
I installed ibus-table-1.5.0.20140306-1.fc20 today and found there are new error messages in ~/.ibus/tables/debug.log Error message 1: Traceback (most recent call last): File "/usr/share/ibus-table/engine/tabsqlitedb.py", line 1008, in check_phrase_internal keyout = [k for k in userdb if k in mudb] NameError: global name 'userdb' is not defined Error message 2: Traceback (most recent call last): File "/usr/share/ibus-table/engine/table.py", line 1610, in do_process_key_event result = self._process_key_event (key) File "/usr/share/ibus-table/engine/table.py", line 1632, in _process_key_event return self._table_mode_process_key_event (key) File "/usr/share/ibus-table/engine/table.py", line 1724, in _table_mode_process_key_event if ascii_ispunct(key.code): File "/usr/share/ibus-table/engine/table.py", line 78, in ascii_ispunct if character in '''!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~''': TypeError: 'in <string>' requires string as left operand, not int 

Thank you very much for testing!

Comment 10 Daniel 2014-03-12 05:20:04 UTC
Mike,
Thank you very much for your contact.
I installed the ibus-table-1.5.0.20140306-1.fc20 package and found there still the following error in ~/.ibus/table/debug.log

Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/tabsqlitedb.py", line 1008, in check_phrase_internal
    keyout = [k for k in userdb if k in mudb]
NameError: global name 'userdb' is not defined

BTW, I am using ibus-table-chinese-wubi-jidian-1.4.6-3.fc20.noarch and this error occurs when I am trying to input a phase with more than one charactor.

Comment 11 Fedora Update System 2014-03-12 07:32:48 UTC
ibus-table-1.5.0.20140312-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140312-1.fc19

Comment 12 Fedora Update System 2014-03-12 07:33:50 UTC
ibus-table-1.5.0.20140312-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140312-1.fc20

Comment 13 Daniel 2014-03-12 11:29:42 UTC
I installed ibus-table-1.5.0.20140312-1.fc20 today and comfirmed that it solved all the error log problems.
There is no more error in ~/.ibus/tables/debug.log

Comment 14 Mike FABIAN 2014-03-12 11:58:07 UTC
Thank you very much!

When I use wubi-haifeng86 and type “akef” or “akfg”
I see the messages 

    --- 2014-03-12: 08:41:47 ---
    pharse pharse "

Comment 15 Mike FABIAN 2014-03-12 12:02:10 UTC
Created attachment 873492 [details]
ibus-table-pharse-pharse-fail.png

screen shot showing the strange message in the log when typing “akef”.

Comment 16 Mike FABIAN 2014-03-12 12:07:37 UTC
Bugzilla seems to have a problem with characters above the BMP,
I’ll repeat comment#14 without the characters from above the BMP replaced
by U+.....:

When I use wubi-haifeng86 and type “akef” or “akfg”
I see the messages 

    --- 2014-03-12: 08:41:47 ---
    pharse pharse "U+26BBB." fail.
    pharse pharse "U+26BBB." fail.
    pharse pharse "U+26BBB." fail.
    pharse pharse "U+26BBB." fail.
    pharse pharse "難." fail.


in the debug log file.

These key sequences are in the wubi table (wubi-haifeng86.UTF-8 in the source of
ibus-table-chinese):

    akfe	U+0268CA.	100

    akfg	難.	100

But they are not inserted into the goucima table when creating
the sqlite database with tabcreatedb.

I am not sure at the momement whether this is a problem or not.

If it is not a problem, there should be a more harmless message
in the changelog maybe stating that no goucima was found for the character 難
but it will continue to do something else now. The current message
looks ugly and it is also ugly that it is created by an exception.

Is everything working OK as far as the above characters are concerned or
do we have a real problem here?

Comment 17 Daniel 2014-03-12 13:07:21 UTC
Mike,
Thank you for your information.
I am using wubi-jidian.  When I switch to "简大"(Simplified with big vocabulary) or "繁大"(Traditional with big vocabulary) mode, I get the following error in ~/.ibus/table/debug.log when I type "akfg".

Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/table.py", line 1610, in do_process_key_event
    result = self._process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1632, in _process_key_event
    return self._table_mode_process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1867, in _table_mode_process_key_event
    res = self._editor.add_input ( keychar )
  File "/usr/share/ibus-table/engine/table.py", line 407, in add_input
    res = self.update_candidates ()
  File "/usr/share/ibus-table/engine/table.py", line 758, in update_candidates
    self._candidates[0] = self.filter_candidates (self._candidates[0])
  File "/usr/share/ibus-table/engine/table.py", line 702, in filter_candidates
    + filter (lambda x: x[bm_index] & (1 << 2), candidates)
TypeError: unsupported operand type(s) for +: 'filter' and 'filter'

Comment 18 Daniel 2014-03-12 13:07:52 UTC
Mike,
Thank you for your information.
I am using wubi-jidian.  When I switch to "简大"(Simplified with big vocabulary) or "繁大"(Traditional with big vocabulary) mode, I get the following error in ~/.ibus/tables/debug.log when I type "akfg".

Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/table.py", line 1610, in do_process_key_event
    result = self._process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1632, in _process_key_event
    return self._table_mode_process_key_event (key)
  File "/usr/share/ibus-table/engine/table.py", line 1867, in _table_mode_process_key_event
    res = self._editor.add_input ( keychar )
  File "/usr/share/ibus-table/engine/table.py", line 407, in add_input
    res = self.update_candidates ()
  File "/usr/share/ibus-table/engine/table.py", line 758, in update_candidates
    self._candidates[0] = self.filter_candidates (self._candidates[0])
  File "/usr/share/ibus-table/engine/table.py", line 702, in filter_candidates
    + filter (lambda x: x[bm_index] & (1 << 2), candidates)
TypeError: unsupported operand type(s) for +: 'filter' and 'filter'

Comment 19 Fedora Update System 2014-03-12 15:33:09 UTC
ibus-table-1.5.0.20140312-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140312-2.fc19

Comment 20 Fedora Update System 2014-03-12 15:34:18 UTC
ibus-table-1.5.0.20140312-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.5.0.20140312-2.fc20

Comment 21 Daniel 2014-03-13 02:16:47 UTC
I installed ibus-table-1.5.0.20140312-2.fc20 today and comfirmed that it solved all the error log problems.
There is no more error in ~/.ibus/tables/debug.log even when I switch to "简大"(Simplified with big vocabulary) or "繁大"(Traditional with big vocabulary) mode.

Comment 22 Fedora Update System 2014-04-02 09:25:21 UTC
ibus-table-1.5.0.20140312-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2014-04-02 09:28:33 UTC
ibus-table-1.5.0.20140312-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.