Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1197001 - [abrt] ibus-table: main.py:222:main:AttributeError: 'NoneType' object has no attribute 'lower'
Summary: [abrt] ibus-table: main.py:222:main:AttributeError: 'NoneType' object has no ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus-table
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike FABIAN
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:2cafda34115624d46cdf0f3ed74...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-27 10:21 UTC by mkwadee
Modified: 2015-03-26 22:04 UTC (History)
7 users (show)

Fixed In Version: ibus-table-1.9.4-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-26 21:35:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (deleted)
2015-02-27 10:21 UTC, mkwadee
no flags Details
File: environ (deleted)
2015-02-27 10:21 UTC, mkwadee
no flags Details

Description mkwadee 2015-02-27 10:21:35 UTC
Version-Release number of selected component:
ibus-table-1.9.1-1.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python3 /usr/share/ibus-table/engine/main.py --xml
executable:     /usr/share/ibus-table/engine/main.py
kernel:         3.18.7-100.fc20.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
main.py:222:main:AttributeError: 'NoneType' object has no attribute 'lower'

Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/main.py", line 293, in <module>
    main()
  File "/usr/share/ibus-table/engine/main.py", line 222, in main
    _locale = getdefaultlocale()[0].lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Local variables in innermost frame:
_all_dbs: ['/usr/share/ibus-table/tables/easy-big.db']
tostring: <function tostring at 0x7f9981f5d830>
_sq_db: <tabsqlitedb.tabsqlitedb object at 0x7f99825bc410>
egs: <Element 'engines' at 0x7f9982588368>
_longname: <Element 'longname' at 0x7f99818d5890>
_db: '/usr/share/ibus-table/tables/easy-big.db'
Element: <class 'xml.etree.ElementTree.Element'>
getdefaultlocale: <function getdefaultlocale at 0x7f99842f3290>
dbs: <filter object at 0x7f9981f3f490>
_name: <Element 'name' at 0x7f99818d5838>
SubElement: <built-in function SubElement>
_engine: <Element 'engine' at 0x7f99818d5730>
engine_name: 'easy-big'
setup_arg: '/usr/libexec/ibus-setup-table --engine-name table:easy-big'

Comment 1 mkwadee 2015-02-27 10:21:38 UTC
Created attachment 995965 [details]
File: backtrace

Comment 2 mkwadee 2015-02-27 10:21:39 UTC
Created attachment 995966 [details]
File: environ

Comment 3 Mike FABIAN 2015-02-27 21:21:16 UTC
diff --git a/engine/main.py b/engine/main.py
index ce9310b..f663eeb 100644
--- a/engine/main.py
+++ b/engine/main.py
@@ -204,7 +204,12 @@ def main():
             _longname = SubElement (_engine, 'longname')
             _longname.text = ''
             # getdefaultlocale() returns something like ('ja_JP', 'UTF-8').
-            _locale = getdefaultlocale()[0].lower()
+            # In case of C/POSIX locale it returns (None, None)
+            _locale = getdefaultlocale()[0]
+            if _locale:
+                _locale = _locale.lower()
+            else:
+                _locale = 'en'
             _longname.text = _sq_db.ime_properties.get(
                 '.'.join(['name', _locale]))
             if not _longname.text:

Comment 4 Fedora Update System 2015-03-02 09:53:27 UTC
ibus-table-1.9.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.9.3-1.fc20

Comment 5 Fedora Update System 2015-03-02 09:54:03 UTC
ibus-table-1.9.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/ibus-table-1.9.3-1.fc21

Comment 6 Fedora Update System 2015-03-02 09:54:33 UTC
ibus-table-1.9.3-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/ibus-table-1.9.3-1.fc22

Comment 7 Fedora Update System 2015-03-02 23:06:42 UTC
Package ibus-table-1.9.3-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 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.9.3-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2914/ibus-table-1.9.3-1.fc22
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-03-08 07:55:49 UTC
ibus-table-1.9.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-table-1.9.4-1.fc20

Comment 9 Fedora Update System 2015-03-08 07:56:24 UTC
ibus-table-1.9.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/ibus-table-1.9.4-1.fc21

Comment 10 Fedora Update System 2015-03-08 07:58:22 UTC
ibus-table-1.9.4-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/ibus-table-1.9.4-1.fc22

Comment 11 Fedora Update System 2015-03-26 21:35:02 UTC
ibus-table-1.9.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-03-26 21:57:40 UTC
ibus-table-1.9.4-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-03-26 22:04:02 UTC
ibus-table-1.9.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.