Bug 1262726 - [abrt] timeline: experimentalfeaturedateformatting.py:96:_get_field_positions:IndexError: list index out of range
[abrt] timeline: experimentalfeaturedateformatting.py:96:_get_field_positions...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: timeline (Show other bugs)
22
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:d3f23d4cdc2f6b864e0ed5a4e19...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-14 04:12 EDT by Tong Hui
Modified: 2015-12-17 03:52 EST (History)
2 users (show)

See Also:
Fixed In Version: timeline-1.5.1-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-17 03:52:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.93 KB, text/plain)
2015-09-14 04:12 EDT, Tong Hui
no flags Details
File: environ (341 bytes, text/plain)
2015-09-14 04:12 EDT, Tong Hui
no flags Details

  None (edit)
Description Tong Hui 2015-09-14 04:12:03 EDT
Version-Release number of selected component:
timeline-1.5.0-1.fc22

Additional info:
reporter:       libreport-2.6.2
cmdline:        python /usr/bin/timeline
executable:     /usr/bin/timeline
kernel:         4.1.6-200.fc22.x86_64+debug
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
experimentalfeaturedateformatting.py:96:_get_field_positions:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/bin/timeline", line 56, in <module>
    from timelinelib.wxgui.setup import start_wx_application
  File "/usr/lib/python2.7/site-packages/timelinelib/wxgui/setup.py", line 27, in <module>
    from timelinelib.wxgui.dialogs.mainframe import MainFrame
  File "/usr/lib/python2.7/site-packages/timelinelib/wxgui/dialogs/mainframe.py", line 43, in <module>
    from timelinelib.wxgui.components.timeline import TimelinePanel
  File "/usr/lib/python2.7/site-packages/timelinelib/wxgui/components/timeline.py", line 22, in <module>
    from timelinelib.view.drawingarea import TimelineCanvasController
  File "/usr/lib/python2.7/site-packages/timelinelib/view/drawingarea.py", line 23, in <module>
    from timelinelib.features.experimental.experimentalfeatures import EVENT_DONE
  File "/usr/lib/python2.7/site-packages/timelinelib/features/experimental/experimentalfeatures.py", line 46, in <module>
    LOCALE_DATE = ExperimentalFeatureDateFormatting()
  File "/usr/lib/python2.7/site-packages/timelinelib/features/experimental/experimentalfeaturedateformatting.py", line 43, in __init__
    self._construct_format(dt)
  File "/usr/lib/python2.7/site-packages/timelinelib/features/experimental/experimentalfeaturedateformatting.py", line 88, in _construct_format
    self._field_positions = self._get_field_positions(dt)
  File "/usr/lib/python2.7/site-packages/timelinelib/features/experimental/experimentalfeaturedateformatting.py", line 96, in _get_field_positions
    return {keys[0]: 0, keys[1]: 1, keys[2]: 2}
IndexError: list index out of range

Local variables in innermost frame:
keys: ['3333', '\xb9\xb411\xe6\x9c\x8822\xe6\x97\xa5']
dt: '3333\xe5\xb9\xb411\xe6\x9c\x8822\xe6\x97\xa5'
self: <timelinelib.features.experimental.experimentalfeaturedateformatting.ExperimentalFeatureDateFormatting object at 0x7f6d8b696850>
Comment 1 Tong Hui 2015-09-14 04:12:06 EDT
Created attachment 1073123 [details]
File: backtrace
Comment 2 Tong Hui 2015-09-14 04:12:07 EDT
Created attachment 1073124 [details]
File: environ
Comment 3 Rickard Lindberg 2015-12-04 06:53:04 EST
I have confirmed that this bug is still present in the latest commit.

Here is how to reproduce it:

$ hg clean && LANG=zh_CN ./source/timeline.py -c non-existing.cfg :tutorial:
...
omitted lines
...
  File "./source/timelinelib/features/experimental/experimentalfeaturedateformatting.py", line 98, in _get_field_positions
    return {keys[0]: 0, keys[1]: 1, keys[2]: 2}
IndexError: list index out of range

In other words, it looks like the Chinese locale/date format is not handled correctly.
Comment 4 Rickard Lindberg 2015-12-04 07:26:55 EST
Print of df variable:

>>> x='3333\xe5\xb9\xb411\xe6\x9c\x8822\xe6\x97\xa5'
>>> print(x)
3333年11月22日
Comment 5 Rickard Lindberg 2015-12-04 07:28:03 EST
(In reply to Rickard Lindberg from comment #4)
> Print of df variable:

dt that is.
Comment 6 Fedora Update System 2015-12-07 01:44:06 EST
timeline-1.5.1-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b16dfe795a
Comment 7 Rickard Lindberg 2015-12-07 01:53:56 EST
I've fixed the problem in 1.5.1. The next upcoming release (1.9.0) will also contain the fix.
Comment 8 Fedora Update System 2015-12-07 18:21:54 EST
timeline-1.5.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update timeline'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b16dfe795a
Comment 9 Fedora Update System 2015-12-17 03:52:47 EST
timeline-1.5.1-1.fc22 has been pushed to the Fedora 22 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.