• edgartaor schrieb...
    • Benutzer
    • 18. Okt. 2010, 3:55

    UTF8 FAIL


    I get this error:

    Exception in thread Thread-35:
    Traceback (most recent call last):
    File "C:\Python27\lib\threading.py", line 530, in __bootstrap_inner
    self.run()
    File "C:\Python27\lib\threading.py", line 483, in run
    self.__target(*self.__args, **self.__kwargs)
    File "C:\LASTFMPROXY\main.py", line 395, in gotconnection
    cont = cont + "np_" + tmp + " = '" + string.replace(m[tmp].decode("utf8"), "
    '", "\\'") + "';\n"
    File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4:
    ordinal not in range(128)

    The consecuences of this error is that the web page on localhost:1881 don't show artist name, album, image. This happen when the artist's name or track's title have some caracters out of utf8.

    Can you fix this?

    Sorry if my english isn't good...

  • Sorry to necro-post, but got the same problem here, execpt it can't encode character u'/2019 in position 13. It all goes wrong after it's played one track, the browser stops refreshing and thinks that nothing is playing and I can't skip horrible songs or love nice songs :( This happens in Linux and Windows too with various versions of Python. It scrobbles fine, though, which is the main thing.

    • [Gelöschter Benutzer] schrieb...
    • Benutzer
    • 3. Jul. 2011, 17:07
    The same problem

Anonyme Benutzer dürfen keine Beiträge schreiben. Bitte log dich ein oder registriere dich, um Beiträge in den Foren schreiben zu können.