problem with turkish locale

Bug #318328 reported by Samed Beyribey
4
Affects Status Importance Assigned to Milestone
LottaNZB
Fix Released
Medium
Severin H

Bug Description

Using Turkish locale (tr_TR.utf8) i get the following error, and due to this error i cannot see download progress bar:
----------------------------
02:55:02 environ No tr_TR translation found for domain kiwi
02:55:02 environ No tr_TR translation found for domain lottanzb
02:55:02 environ overriding default domain, was lottanzb
02:55:03 lottanzb.core Starting LottaNZB 0.4.0...
02:55:03 lottanzb.backend Connected to the HellaNZB daemon at localhost:8760.
02:55:03 lottanzb.modes Set usage mode to 'Local front-end'.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/site-packages/lottanzb/backend.py", line 78, in run
    self.update_state()
  File "/usr/lib/python2.6/site-packages/lottanzb/backend.py", line 347, in update_state
    update_download_list(download_type)
  File "/usr/lib/python2.6/site-packages/lottanzb/backend.py", line 319, in update_download_list
    download_state = getattr(Download.State, download_type.upper())
AttributeError: type object 'State' has no attribute 'PROCESSiNG'
-------------------------
Please pay attention to 'PROCESSiNG'.
Turkish has 4 letter "I"s. English has only two, a lowercase dotted i and an uppercase dotless I. Turkish has lowercase and uppercase forms of both dotted and dotless I.

http://www.i18nguy.com/unicode/turkish-i18n.html describes the problem here.

Distro: Arch Linux
Python: Tested with python 2.4, 2.5 and 2.6 series, same result.

Revision history for this message
Severin H (severinh) wrote :

Hi ras0ir,

thanks a lot for reporting this bug. It seems to be a quite widespread problem and I just noticed that it could also be encountered in Exaile. Fixing the bug is not particularly hard and can be done by omitting the usage of the upper() method, which doesn't do what we expect from it when the Turkish locale is used. The upper() method is used twice in LottaNZB's source code. I just fixed the problem in backend.py, which causes the download progress bar to malfunction. Additionally, the upper method is used to save the HellaNZB configuration file in the stand-alone mode. Did you encounter any problems with that or didn't you use the stand-alone mode?

I'll commit the fix for the bug soon. If we decide to release a LottaNZB version 0.4.1, the fix will certainly be included. Would you mind if I create a source package for you with the fix included so that you can test if it works?

Changed in lottanzb:
assignee: nobody → lantash
importance: Undecided → Medium
milestone: none → 0.4
status: New → In Progress
Revision history for this message
Samed Beyribey (ras0ir) wrote :

Well, i only use local front-end mode, and it will be great if you provide source with the patch. On the other hand, if i try to use stand-alone mode i get the following error:
11:27:06 lottanzb.modes Could not enter usage mode 'Stand-alone'.
11:27:06 lottanzb.modes.ui /usr/lib/python2.6/site-packages/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead

But it's not so important because many distros have not switched to python 2.6 yet, and i know the warning is related to the python2.6

I've attached a screenshot from stand-alone mode.

Revision history for this message
Severin H (severinh) wrote :

This source package contains a potential fix for the bug. Would you mind giving it a try and tell me if it works?

You can extract the package and install it as described on lottanzb.org.

Unfortunately, we didn't have the time yet to check the Python 2.6/3.0 compatibility, but I guess it will be necessary to do so soon. The problem won't be LottaNZB itself anyway, but its dependencies.

Revision history for this message
Samed Beyribey (ras0ir) wrote :

The patch fixed my problem exactly and LottaNZB works like a charm now.

Thank you very much.

Revision history for this message
Severin H (severinh) wrote :

Comment on revision 598:

"Don't use the locale dependent `upper` method when saving HellaNZB's configuration file.

ras0ir, who reported this bug, didn't test LottaNZB's stand-alone mode but I'm pretty sure he would have run into this problem that should be fixed with this revision."

Changed in lottanzb:
status: In Progress → Fix Committed
Revision history for this message
Severin H (severinh) wrote :

Here's the new patched source package that should also fix LottaNZB's stand-alone mode. I guess you would need to use Python 2.5 for that. :-/

Revision history for this message
Samed Beyribey (ras0ir) wrote :

Well, i've tested it using python 2.5 and 2.4 and it worked.
However, using 2.6 i got
Traceback (most recent call last):

without any debug output.

Severin H (severinh)
Changed in lottanzb:
status: Fix Committed → Fix Released
Severin H (severinh)
Changed in lottanzb:
milestone: 0.4 → 0.4.1
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.