trdlo / client175

Automatically exported from code.google.com/p/client175
GNU General Public License v3.0
0 stars 0 forks source link

lyrics -> 500er internal error #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, got an internal 500er error -> detailed in attached file:

500 Internal Server Error

The server encountered an unexpected condition which prevented it from 
fulfilling the request.

Traceback (most recent call last):
  File "/var/www/client175/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/var/www/client175/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/var/www/client175/server.py", line 339, in lyrics
    txt = lyricwiki.get_lyrics(artist, title)
  File "/var/www/client175/lyricwiki.py", line 99, in get_lyrics
    lyrics = _get_lyrics(artist, title)
  File "/var/www/client175/lyricwiki.py", line 58, in _get_lyrics
    for page_title in _get_page_titles(artist, title):
  File "/var/www/client175/lyricwiki.py", line 51, in _get_page_titles
    for t in content["query"]["search"]:
KeyError: 'query'

Original issue reported on code.google.com by i...@flirt-hunter.de on 25 Jul 2012 at 4:02

Attachments:

GoogleCodeExporter commented 8 years ago
ok sorry , installed from svn and now its working. but there is another bug:

Get the same error, saving meta tags with  ö,ä,ü and ß is not working :

500 Internal Server Error

The server encountered an unexpected condition which prevented it from 
fulfilling the request.

Traceback (most recent call last):
  File "/var/www/client175/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/var/www/client175/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/var/www/client175/server.py", line 249, in edit
    f.write_tags(tags)
  File "/var/www/client175/metadata/_base.py", line 219, in write_tags
    self._set_tag(raw, self.tag_mapping[tag], tagdict[tag])
  File "/var/www/client175/metadata/_id3.py", line 105, in _set_tag
    frame = id3.Frames[tag](encoding=3, text=data)
  File "/var/www/client175/mutagen/id3.py", line 975, in __init__
    self, kwargs.get(checker.name, None))
  File "/var/www/client175/mutagen/id3.py", line 739, in validate
    value = value.split(self.sep)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordina

Original comment by i...@flirt-hunter.de on 25 Jul 2012 at 4:30

GoogleCodeExporter commented 8 years ago
I think it must be getting something back from the lyrics API different from 
what it expects?

I added a:

    try:
        for t in content["query"]["search"]:
            titles.append(t["title"])
    except:
        titles=[]

To work around the error - I now get Not Found for everything instead of an 
ugly 500 server error!

Original comment by jamieat...@gmail.com on 30 Mar 2013 at 3:18