Absolute-Series-Scanner icon indicating copy to clipboard operation
Absolute-Series-Scanner copied to clipboard

Special Character causes a crash during scanning

Open efalsken opened this issue 2 years ago • 4 comments

Scanner Log:

Jun 19, 2023 20:38:38.554 [140589647653696] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1316, in Scan
    Scan(path, sorted(subdir_files), media, sorted(subdir_dirs), language=language, root=root, kwargs_trigger=True)  #relative path for dir or it will show only grouping folder series
  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/Absolute Series Scanner.py", line 1190, in Scan
    standard_holding.append([file, root, path, show, season, int(ep), title, year, int(ep2) if ep2 and ep2.isdigit() else None, rx, tvdb_mapping, unknown_series_length, offset_season, offset_episode, mappingList])
ValueError: invalid literal for int() with base 10: '\xb2'
Jun 19, 2023 20:38:38.561 [140589647653696] ERROR - We got an error scanning in /data/Videos/Anime
Jun 19, 2023 20:40:09.080 [140589647653696] WARN - Scanning the location /data/Videos/Anime did not complete

The file in question was: [Anime Time] Neon Genesis Evangelion - Death (True)².mkv

Apparently, the code that was trying to identify the episode number thought that the ^2 superscript was a digit. I'd recommend an extra regex filter [0-9] if your environment not support the \d subclass.

efalsken avatar Jun 21 '23 18:06 efalsken

Am really bad at unicode and other strings, so do not have the level to fix.

ZeroQI avatar Jun 21 '23 18:06 ZeroQI

This throws and causes the entire scan to halt without any feedback on what file caused the problem. I had to go through everything that I had added to find it.

efalsken avatar Jun 21 '23 19:06 efalsken

I understand the implications perfectly, however am still ill equipped to deal with such string coding issues. Does it crash plex scanner as well?

ZeroQI avatar Jun 21 '23 19:06 ZeroQI

Yes. The scanning terminates in full when encountering this file name and no further library updates happen. I'm good with regex and can help. Hit me up in discord.

efalsken avatar Jun 21 '23 20:06 efalsken