Turkish locale problem

Bug #191687 reported by Samed Beyribey
8
Affects Status Importance Assigned to Milestone
Exaile
Invalid
Undecided
Unassigned

Bug Description

Hi,
I'm using exaile 0.2.11, and my locale is tr_TR.utf8

I can run exaile without any problem but when i try to play a music file, a get an error dialog complaining about "ARTiST". When i click OK, music interrupts

So i decided to run exaile from console and i see that output:
<<<<<<<< Quote >>>>>>>>
 -----------------------
 play ( /usr/lib/exaile/xl/player.py @ 581):
-----------------------
Traceback (most recent call last):
  File "/usr/lib/exaile/xl/player.py", line 606, in play
    self.play_track(track, from_button=True)
  File "/usr/lib/exaile/xl/player.py", line 554, in play_track
    artist_id = library.get_column_id(self.exaile.db, 'artists', 'name', track.artist)
  File "/usr/lib/exaile/xl/common.py", line 182, in wrapper
    return func(self,*__args,**__kw)
  File "/usr/lib/exaile/xl/library.py", line 463, in get_column_id
    cols = globals()['%s%s' % (prep, table.upper())]
KeyError: 'ARTiSTS'
<<<<<<<< End Of Quote >>>>>>>>

I think this problem comes from Turkish alphabet, because we have i,İ,ı,I
i character uppercase => İ
ı character uppercase => I

So my locale tries to output "ARTİSTS" which is not "ARTISTS"

When i change my locale to en_US.utf8, this problem disappears. I can run exaile without any problems.

I hope this will be fixed
Thanks,

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Yes, it's because of the Turkish "i" problem.

Can you try something? In the file xl/library.py, find this line:

cols = globals()['%s%s' % (prep, table.upper())]

and change "table.upper()" to just "table"

Changed in exaile:
status: New → Confirmed
Revision history for this message
Samed Beyribey (ras0ir) wrote :

-----------------------
 play ( /usr/lib/exaile/xl/player.py @ 581):
-----------------------
Traceback (most recent call last):
  File "/usr/lib/exaile/xl/player.py", line 606, in play
    self.play_track(track, from_button=True)
  File "/usr/lib/exaile/xl/player.py", line 554, in play_track
    artist_id = library.get_column_id(self.exaile.db, 'artists', 'name', track.artist)
  File "/usr/lib/exaile/xl/common.py", line 182, in wrapper
    return func(self,*__args,**__kw)
  File "/usr/lib/exaile/xl/library.py", line 463, in get_column_id
    cols = globals()['%s%s' % (prep, table)]
KeyError: 'artists'

same error but ARTiSTS changed to artists

Revision history for this message
seqizz (gurkanGur) (seqizz-deactivatedaccount) wrote :

FIXED!

i've replaced all "artists" words to "ARTISTS" in this files:
/usr/lib/exaile/xl/covers.py
/usr/lib/exaile/xl/common.py
/usr/lib/exaile/xl/player.py
/usr/lib/exaile/xl/library.py

(One of this files doesn't include this string, i forgot :)

Because of this bug like Johannes Sasongko's says:
Turkish language has 2 capital and 2 not "i"
Like I - ı - i - İ

Hope this helps.. :)

Revision history for this message
heartsmagic (heartsmagic) wrote :

IMHO, it is /usr/lib/exaile/xl/db.py

Revision history for this message
heartsmagic (heartsmagic) wrote :

Ok, i think it is just 4 files: covers.py db.py library.py player.py
I am attaching a patch for this. I successfuly packaged exaile with this patch for a distro.

Revision history for this message
heartsmagic (heartsmagic) wrote :

Sorry fot bothering the list but there is the same problem with PLAYLiSTS issue. When you want to create a new playlist, an error occures with the word PLAYLiSTS. I revised the previous patch, also i changed it a bit for the first problem.

Revision history for this message
Adam Olsen (arolsen) wrote :

Cleaning out old bugs.

Changed in exaile:
status: Confirmed → Invalid
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.