You are not logged in.

#1 2008-08-05 16:22:12

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Sonata suddenly stopped working!

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

#2 2008-08-05 17:47:38

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Sonata suddenly stopped working!

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

#3 2008-08-05 17:55:46

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

That solved it! Thanks a lot! big_smile

Offline

#4 2008-08-24 12:23:30

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

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

#5 2008-08-24 13:54:43

Hohoho
Member
Registered: 2007-06-23
Posts: 222

Re: Sonata suddenly stopped working!

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

#6 2008-08-25 19:44:09

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

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

#7 2008-08-26 16:28:32

Hohoho
Member
Registered: 2007-06-23
Posts: 222

Re: Sonata suddenly stopped working!

What locale are you using?

Offline

#8 2008-08-26 16:39:29

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Sonata suddenly stopped working!

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

#9 2008-08-27 03:05:22

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Sonata suddenly stopped working!

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

#10 2008-08-28 21:48:51

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

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! smile

Last edited by qweac (2008-08-28 21:49:34)

Offline

#11 2008-08-30 14:32:38

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Sonata suddenly stopped working!

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

#12 2008-08-31 15:13:18

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

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

#13 2008-08-31 19:23:21

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Sonata suddenly stopped working!

As I said, you need revision 851 of sonata-svn, and that clearly shows you have 850.


I am a gated community.

Offline

#14 2008-08-31 20:09:29

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

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

#15 2008-09-01 15:26:25

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Sonata suddenly stopped working!

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

#16 2008-09-01 17:43:00

qweac
Member
From: Norway
Registered: 2008-05-27
Posts: 44

Re: Sonata suddenly stopped working!

Thanks. Got the new version. Doing some testing now.

Last edited by qweac (2008-09-01 17:43:15)

Offline

#17 2008-11-30 01:40:45

medic2000
Member
Registered: 2008-11-25
Posts: 6

Re: Sonata suddenly stopped working!

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

#18 2008-11-30 03:11:52

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Sonata suddenly stopped working!

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

#19 2008-11-30 10:52:18

medic2000
Member
Registered: 2008-11-25
Posts: 6

Re: Sonata suddenly stopped working!

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

#20 2008-11-30 16:46:52

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Sonata suddenly stopped working!

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

#21 2008-12-11 13:31:02

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Sonata suddenly stopped working!

medic2000 wrote:

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

#22 2009-01-07 17:13:33

dhmo
Member
Registered: 2009-01-07
Posts: 1

Re: Sonata suddenly stopped working!

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

Board footer

Powered by FluxBB