First off let me say this is by no means an official fix, but it gets the job done.
Anyways I installed Linux Mint 5 a few weeks ago (upgrading from Mint 4) and I am thoroughly enjoying it. The one “downgrade” I wasn’t too impressed using Rhythmbox instead of Amarok. The reason Rhythmbox was chosen to be packaged was because it is smaller so it saves space for the LiveCD. The most annoying is clicking the ‘X’ in the upper right corner closes the program instead of minimizing it to a tray icon. It also has very limited preferences and options for the program. I read around the internet about Linux media players such as: banshee, songbird, amarok, exaile, rhythmbox, and each have their own features to offer. What I wanted was a less bloated player, don’t get me wrong amarok is great but I probably use 10% of it’s features. I decided to give exaile a try. performed a simple sudo apt-get install exaile and was up and running in no time. I added my music folder to the library and it proceeded to scan my collection. Once it got to the end (2000+ songs) a small alert box popped up, with no description of the error, just one of those busy signs (Red circle with a White dash in the middle). All I could do was click ‘OK’ and then my songs jumped down to 1. This 1 song was a demo song that I think comes with the player. I tried scanning again and the same, non-descriptive error popped up. I proceeded to go to ~/.exaile/exaile.log and noticed that it complained about non UTF-8 characters. After doing some reading around other people have had this bug, and reported it nearly a year ago and they obviously haven’t fixed it. From my understanding the bug lies with the python sql lite local database it is making of all my songs. I was somewhat discouraged so I continued reading the bug reports and somebody posted a line of code that can be added to the db.py file which ignores the songs that have these characters in the name.
Solution
Since about 5 of my songs had this non UTF-8 characters in it, I had no problem with ignoring these, but if your entire library has non UTF-8 characters then you may not want to apply this fix. First off let me thank cerebro84 for posting this fix in the bug report here. Now lets fix your exaile.
- Close exaile if it is open and open up a Terminal
- Enter the command
sudo mv /usr/share/exaile/xl/db.py /usr/share/exaile/xl/db.py.bakandsudo mv /usr/share/exaile/xl/db.pyc /usr/share/exaile/xl/db.pyc.bak - Now we’ve backed up the python file just in case (better safe than sorry) you can edit it. I use gedit but if you are on different linux distros there may be an alternate text editor such as kwrite or kate. Enter the following
sudo gedit /usr/share/exaile/xl/db.py - Now I scrolled down until line 103, you should see something like this:
try:
db = sqlite.connect(self.db_loc, check_same_thread=False)
except sqlite.OperationalError, e:
raise DBOperationalError(str(e))
We want to add a line so it looks like this
try:
db = sqlite.connect(self.db_loc, check_same_thread=False)
db.text_factory = lambda x: unicode(x, "utf-8", "ignore") #Added this line
except sqlite.OperationalError, e:
raise DBOperationalError(str(e))
PLEASE BE AWARE THAT INDENTATION IS CRUCIAL. This means that the line you added must have the same amount of spaces in front of it as the line before it. See my picture below
- Once this is done you can save the file, and close the editor. Now to be extra sure we get rid of the last scan enter the following command in terminal:
rm -R ~/.exaile/This should get rid of any left over erroneous db scans that you may have performed earlier. - Now start up exaile and rescan the library
Hopefully this helps you with you’re problem.

Leave Comment