category list and preview doesn't work for turkish locale

Bug #841698 reported by burcin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RedNotebook
Fix Released
Medium
Jendrik Seipp

Bug Description

I get the following traceback in the categories window on the right when I start rednotebook:

2011-09-05 11:58:09,350 ERROR Sorry! Txt2tags aborted by an unknown error.
Please send the following Error Traceback to the author (<email address hidden>):

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/rednotebook/util/markup.py", line 266, in convert_to_pango
    body, toc = txt2tags.convert(txt, config)
  File "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 5181, in convert
    line = add_inline_tags(line)
  File "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 4679, in add_inline_tags
    if regex['font%s'%beauti.capitalize()].search(line):
KeyError: 'fontitalic'

The preview button on the toolbar and the categories cloud also displays this.

Here is the top of rednotebook.log:

2011-09-05 11:58:08,895 DEBUG sys.stdout logging level: 20
2011-09-05 11:58:08,896 INFO Writing log to file "/home/rrednb/.rednotebook/
rednotebook.log"
2011-09-05 11:58:09,038 INFO Running in portable mode: False
2011-09-05 11:58:09,038 INFO First Start: True
2011-09-05 11:58:09,039 INFO RedNotebook version: 1.1.8
2011-09-05 11:58:09,045 INFO System info: machine: x86_64, platform: Linux-2
.6.38-tuxonice-r2-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_740_@_1.73GHz-with-gentoo-2.
0.3, processor: Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz, python_version: 2.7.1,
 release: 2.6.38-tuxonice-r2, system: Linux, GTK version: (2, 24, 4), PyGTK vers
ion: (2, 24, 0), Yaml version: 3.09
2011-09-05 11:58:09,199 INFO Using webkit for previews: 1
2011-09-05 11:58:09,276 INFO Cloud ignore list: [u'15.00', u'about', u'autho
r', u'based', u'comma', u"don't", u'filter', u'instead', u'might', u'separated',
 u'should', u'structures', u'there', u'these', u'words']
2011-09-05 11:58:09,276 INFO Cloud include list: [u'job', u'mtv', u'play', u
'spam', u'work']
2011-09-05 11:58:09,276 INFO Using pywebkitgtk for the clouds.
2011-09-05 11:58:09,294 DEBUG Tray icon visible: False
2011-09-05 11:58:09,295 INFO Using zeitgeist: False

Here is the locale for this user:

LANG=en_US.UTF-8
LC_CTYPE=C
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=tr_TR.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=tr_TR.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Related branches

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Thanks for the report. I have fixed the issue in the "Next" branch (see link above). Can you please tell me if it works by doing

bzr branch lp:~jendrikseipp/rednotebook/next

and running RedNotebook without installing as described in the README?

Changed in rednotebook:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Jendrik Seipp (jendrikseipp)
Revision history for this message
burcin (burcin) wrote :

Thanks for the quick response.

Note that the only component in my locale that points to Turkish is LC_PAPER (since I want A4 not letter). I thought LC_CTYPE determines which locale to use for string operations, like upper().

With the latest version from bzr, I get these two:

sorry! txt2tags aborted by an unknown error.
please send the following error traceback to the author (<email address hidden>):

traceback (most recent call last):
  file "/usr/lib64/python2.7/site-packages/rednotebook/util/markup.py", line 281, in convert_to_pango
    body, toc = txt2tags.convert(txt, config)
  file "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 5181, in convert
    line = add_inline_tags(line)
  file "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 4679, in add_inline_tags
    if regex['font%s'%beauti.capitalize()].search(line):
keyerror: 'fontitalic'

Sorry! Txt2tags aborted by an unknown error.
Please send the following Error Traceback to the author (<email address hidden>):

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/rednotebook/util/markup.py", line 266, in convert_to_pango
    body, toc = txt2tags.convert(txt, config)
  File "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 5181, in convert
    line = add_inline_tags(line)
  File "/usr/lib64/python2.7/site-packages/rednotebook/external/txt2tags.py", line 4679, in add_inline_tags
    if regex['font%s'%beauti.capitalize()].search(line):
KeyError: 'fontitalic'

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote : Re: [Bug 841698] Re: category list and preview doesn't work

I think you may have to do a fresh checkout as these lines are not
present in the latest revision. Be sure to checkout the next branch, not
the default trunk.

Revision history for this message
burcin (burcin) wrote : Re: category list and preview doesn't work

You're right, these were saved as categories/tags in the data files. I should have realized something is wrong from the file names pointing to the system site-packages directory.

Everything seems to be working fine now. Thank you for your help and the great software.

summary: - category list and preview doesn't work
+ category list and preview doesn't work for turkish locale
Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Fixed in version 1.2

Changed in rednotebook:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.