karamanolev/WhatManager2

UnicodeDecodeError - Python

Opened this issue · 0 comments

I get the following from time to time on albums, especially if they are international artists with accents on letters.

I've tried messing with the tasks.py script, but don't really have a solid fix on how to fix it.

[2016-02-15 21:01:28,710: WARNING/Worker-1] Will transcode 32743498
[2016-02-15 21:01:29,785: WARNING/Worker-1] Progress: Started transcoding to V2
[2016-02-15 21:01:29,787: WARNING/Worker-1] Progress: Checking tags and filenames
[2016-02-15 21:01:29,789: WARNING/Worker-1] Check tags in
[2016-02-15 21:01:29,789: WARNING/Worker-1] /mnt/nfs/32743498/Artist-Name-CD-FLAC-2015
2016-02-15 21:01:29,927: ERROR/MainProcess] Task what_transcode.tasks.transcode[db831d07-0b94-4c34-a398-9e1c893ebf8c] raised unexpected: UnicodeDecodeError('ascii', '/01 Chez la m\xc3\xa8re.flac', 13, 14, 'ordinal not in range(128)')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/karson/WhatManager2/what_transcode/tasks.py", line 378, in transcode
  File "/home/karson/WhatManager2/what_transcode/tasks.py", line 336, in run
    finally:
  File "/home/karson/WhatManager2/what_transcode/tasks.py", line 371, in transcode_upload_lossless
    print 'Uploaded {0}'.format(bitrate.upper())
  File "/home/karson/WhatManager2/what_transcode/tasks.py", line 100, in run

  File "/home/karson/WhatManager2/what_transcode/tasks.py", line 255, in transcode_torrent

  File "/home/karson/WhatManager2/what_transcode/utils.py", line 150, in check_directory_tags_filenames
    child_path = os.path.join(dir_path, child)
  File "/usr/lib/python2.7/posixpath.py", line 80, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)