ZeroQI / Absolute-Series-Scanner

Seasons, absolute mode, Subfolders...
1.01k stars 155 forks source link

Fix crash for non english path #190

Closed JayXon closed 6 years ago

JayXon commented 6 years ago
Oct 27, 2018 16:42:51.779 [1120] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "C:\Users\JayXon\AppData\Local\Plex Media Server\Scanners\Series\Absolute Series Scanner.py", line 472, in Scan
    set_logging(foldername=PLEX_LIBRARY[root] if root in PLEX_LIBRARY else '', filename=log_filename+'.filelist.log', mode='w') #add grouping folders filelist
  File "C:\Users\JayXon\AppData\Local\Plex Media Server\Scanners\Series\Absolute Series Scanner.py", line 219, in set_logging
    if os.sep=="\\":  LOG_FILE = winapi_path(LOG_FILE) # Bypass DOS path MAX_PATH limitation
  File "C:\Users\JayXon\AppData\Local\Plex Media Server\Scanners\Series\Absolute Series Scanner.py", line 201, in winapi_path
    if path.startswith(u"\\\\"):  return u"\\\\?\\UNC\\" + path[2:]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 109: ordinal not in range(128)
Oct 27, 2018 16:42:51.779 [1120] ERROR - We got an error scanning in D:\Anime
EndOfLine369 commented 6 years ago

Thanks for the fix