You are not logged in.
Pages: 1
Hi!
I was going to change album in Sonata, so I opened the library, but suddenly it was all empty. I tried to restart the program, but now it won't start. Sonata in Terminal gives me this message:
"[erlend@qweac ~]$ sonata
Traceback (most recent call last):
File "/usr/bin/sonata", line 48, in <module>
app = main.Base()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1069, in __init__
self.iterate_now()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1658, in iterate_now
self.iterate()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1615, in iterate
self.handle_change_status()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 3521, in handle_change_status
self.library_browse(root=self.wd)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 2451, in library_browse
coverfile = self.library_get_album_cover(dirs[i], artists[i], albums[i])
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 2486, in library_get_album_cover
tmp, coverfile = self.artwork_get_local_image(dir, artist, album)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 4084, in artwork_get_local_image
testfile = self.target_image_filename(self.ART_LOCATION_COVER, songpath, artist, album)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 5026, in target_image_filename
targetfile = misc.file_exists_insensitive(targetfile)
File "/usr/lib/python2.5/site-packages/sonata/misc.py", line 176, in file_exists_insensitive
regexp = re.compile(filename, re.IGNORECASE)
File "/usr/lib/python2.5/re.py", line 188, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.5/re.py", line 241, in _compile
raise error, v # invalid expression
sre_constants.error: bad character range"
I don't know what this means or if it shows my problem, but I posted it anyway.
I tried to reinstall Sonata, but still the same problem. Anyone?
Offline
Try renaming/deleting your ~/.config/sonata directory and it should hopefully work again.
PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM
Offline
That solved it! Thanks a lot!
Offline
I need more help! The fix mentioned is only temporary. The library goes all white all the time now. When I delete the mentioned folder it works again, but only for a little while. Yesterday I had to delete ~/.config/sonata around 10 times.
How can I fix this?
Offline
Well judging by the traceback some album cover is at fault, its filename to be more exact.
Perhaps you listen to some music that has strange names with rarely used characters or symbols, formatting?
Also reporting this to sonata's bugtracker would be good.
Offline
Thanks for your reply. Yes, I probably do that sometimes, but it seems to happen randomly. How do I find the cover(s) in 90gb of music?
Offline
What locale are you using?
Offline
You should try the SVN-version and see if that works better, or if not, report the bug so it can get fixed.
Looking at the SVN log I saw this, so it might already be fixed in the trunk.
r847 | stonecrest | 2008-08-04 00:48:41 +0200 (mån, 04 aug 2008) | 1 line
prevent bad image files from causing problems
PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM
Offline
vEX, that commit had to do with corrupt image files. But the issue mentioned here should now be fixed in commit 851. If you could test it in sonata-svn (it's in aur), that'd be helpful.
I am a gated community.
Offline
Locale? Norwegian I guess.
I've tried the SVN version, and it also got the same problem.
I just turned Sonata on, and the library was gone. I've only been listening to one band the last days and they don't have any strange symbols in their songs/albums. In other words I can't find a connection between what I listen to, strange symbols and the problem.
Thank you for your efforts to help me!
Last edited by qweac (2008-08-28 21:49:34)
Offline
If you're using sonata-svn revision 851, it doesn't seem possible that you're getting the same error. Can you verify that the traceback is identical to your original post?
I am a gated community.
Offline
This is what I just got:
[erlend@qweac ~]$ sonata
Traceback (most recent call last):
File "/usr/bin/sonata", line 48, in <module>
app = main.Base()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1069, in __init__
self.iterate_now()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1659, in iterate_now
self.iterate()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 1616, in iterate
self.handle_change_status()
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 3532, in handle_change_status
self.library_browse(root=self.wd)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 2452, in library_browse
coverfile = self.library_get_album_cover(dirs[i], artists[i], albums[i])
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 2487, in library_get_album_cover
tmp, coverfile = self.artwork_get_local_image(dir, artist, album)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 4087, in artwork_get_local_image
testfile = self.target_image_filename(None, songpath, artist, album)
File "/usr/lib/python2.5/site-packages/sonata/main.py", line 5039, in target_image_filename
targetfile = misc.file_exists_insensitive(targetfile)
File "/usr/lib/python2.5/site-packages/sonata/misc.py", line 179, in file_exists_insensitive
regexp = re.compile(filename, re.IGNORECASE)
File "/usr/lib/python2.5/re.py", line 188, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.5/re.py", line 241, in _compile
raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis
[erlend@qweac ~]$
And this is my Sonata info:
[root@qweac erlend]# pacman -Qi sonata-svn
Name : sonata-svn
Version : 850-1
URL : http://sonata.berlios.de/
Licenses : GPL
Groups : None
Provides : sonata
Depends On : pygtk python-mpd zsi
Optional Deps : None
Required By : None
Conflicts With : sonata
Replaces : None
Installed Size : 1584.00 K
Packager : Unknown Packager
Architecture : i686
Build Date : Tue Aug 26 19:41:51 2008
Install Date : Tue Aug 26 19:41:57 2008
Install Reason : Explicitly installed
Install Script : Yes
Description : A lightweight GTK+ music client for MPD (SVN Version)
[root@qweac erlend]#
Offline
As I said, you need revision 851 of sonata-svn, and that clearly shows you have 850.
I am a gated community.
Offline
I see, my fault. I used the one in the AUR. I guess i have to compile the new one myself if I want it? I'm pretty new with the whole linux thing, so I really don't know how. Guess I just have to wait for a new version on the AUR.
Offline
Just install sonata-svn again the same way you did the first time. Makepkg (called via yaourt or whatever method you use) will automatically update to the latest revision of the software.
I am a gated community.
Offline
Thanks. Got the new version. Doing some testing now.
Last edited by qweac (2008-09-01 17:43:15)
Offline
In Svn-934-1 and AurPkgbuild-version 857 i still got the an error. Why there is not a fix about yet? Strangely if i stop mpd it starts. And i only got 2 songs in by directory which dont have strange chars.
Traceback (most recent call last):
File "/usr/bin/sonata", line 52, in <module>
app = main.Base()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1089, in __init__
self.iterate_now()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1705, in iterate_now
self.iterate()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1659, in iterate
self.handle_change_status()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3324, in handle_change_status
self.current_update()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3798, in current_update
self.currentdata.append([int(mpdh.get(track, 'id'))] + items)
ValueError: invalid literal for int() with base 10: ''
Last edited by medic2000 (2008-11-30 01:45:21)
Offline
Lets debug it :-)
edit /usr/lib/python2.6/site-packages/sonata/main.py line 3798
make it look like that:
print "%s ::%s::" % (type(mpdh.get(track, 'id')), mpdh.get(track, 'id'))
self.currentdata.append([int(mpdh.get(track, 'id'))] + items)
and paste us the output.
regards
raf
Offline
Do you mean "print ... " will be in line 3798 and "self..." will be in line 3799? If it is the case the output:
<type 'str'> ::::
<type 'str'> ::::
Traceback (most recent call last):
File "/usr/bin/sonata", line 52, in <module>
app = main.Base()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1089, in __init__
self.iterate_now()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1705, in iterate_now
self.iterate()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1659, in iterate
self.handle_change_status()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3324, in handle_change_status
self.current_update()
File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3799, in current_update
self.currentdata.append([int(mpdh.get(track, 'id'))] + items)
ValueError: invalid literal for int() with base 10: ''
Offline
medic2000, that doesn't make any sense to me. mpd is returning "::::" as the track's id number, where it's supposed to be an integer. Even if sonata suppressed the error, some things wouldn't work right. If you have a chance, try stopping by #sonata on freenode, we can try to debug it.
I am a gated community.
Offline
Do you mean "print ... " will be in line 3798 and "self..." will be in line 3799? If it is the case the output:
<type 'str'> :::: <type 'str'> :::: Traceback (most recent call last): File "/usr/bin/sonata", line 52, in <module> app = main.Base() File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1089, in __init__ self.iterate_now() File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1705, in iterate_now self.iterate() File "/usr/lib/python2.6/site-packages/sonata/main.py", line 1659, in iterate self.handle_change_status() File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3324, in handle_change_status self.current_update() File "/usr/lib/python2.6/site-packages/sonata/main.py", line 3799, in current_update self.currentdata.append([int(mpdh.get(track, 'id'))] + items) ValueError: invalid literal for int() with base 10: ''
Sorry for not answering, didn't have time to look at the forums during the last weeks.
This means that MPD is returning an empty string as trackid.
Is your problem already solved?
Regards
raf
Offline
hi!
i don't know if this issue is already fixed but i have found an "ugly" solution for that problem.
issuing a re.escape() just before the line where the error occurs fixed it for me.
my fix in /usr/lib/python2.5/site-packages/sonata/misc.py:
def file_exists_insensitive(filename):
# Returns an updated filename that exists on the
# user's filesystem; checks all possible combinations
# of case.
if os.path.exists(filename):
return filename
filename = re.escape(filename)
regexp = re.compile(filename, re.IGNORECASE)
and thats all. after applying this the error is gone but i have not confirmed if there are any side effects to this solution.
regards,
dhmo
EDIT:
i found the hint for this solution at
http://mail.python.org/pipermail/python … 34708.html
Last edited by dhmo (2009-01-07 17:17:19)
Offline
Pages: 1