Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Character causes a crash during scanning #442

Open
efalsken opened this issue Jun 21, 2023 · 4 comments
Open

Special Character causes a crash during scanning #442

efalsken opened this issue Jun 21, 2023 · 4 comments

Comments

@efalsken
Copy link
Contributor

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.

@ZeroQI
Copy link
Owner

ZeroQI commented Jun 21, 2023

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

@efalsken
Copy link
Contributor Author

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.

@ZeroQI
Copy link
Owner

ZeroQI commented Jun 21, 2023

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

@efalsken
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants