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

ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters #109

Open
Fribb opened this issue Jun 23, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Fribb
Copy link
Contributor

Fribb commented Jun 23, 2022

Full log: here

It seems that the pulled Metadata cannot be applied to the library item in some cases. I would assume that the special characters in the title is the reason for that.

@nbgibson
Copy link

This is mentioned in the Readme briefly, but should probably be given more prominence as the issue isn't on YTA/ASS's side. Plex doesn't like special characters particularly much and you'll want to adapt your intake pipeline to triage things until Plex fixes the problem (if ever). if you're using Youtube-dl/dlp/whatever be sure to include the --restrict-filenames flag in your script to strip out the problem causers. This will usually address the problem but it isn't perfect.

A prime example: Kurzgesagt - In a Nutshell

Plex hates that dash. If you include the flag above you'll end up with "Kurzgesagt_In_a_Nutshell" instead, but at least then you can just manually tweak the display/sort names to be correct and enjoy the properly sourced metadata and so on. I need to see if the non-legacy ASS can handle this a bit more gracefully as I've been sticking with the old version for a while now.

@Fribb
Copy link
Contributor Author

Fribb commented Jul 26, 2022

I don't think that what you describe is it or at least not fully.

For example, in my case, just a couple of hours ago, Kurzgesagt added a new video. The metadata for that was downloaded and applied correctly without any issues.

However, the Agent seems to set the GUID from a combination of the youtube-ID and the title of the file? If that filename then contains filesystem valid but special characters, it fails with Exception serializing Movie with guid.

And this isn't something that was all the time the case, it just happened somewhat recently.

I am not sure why the GUID for plex has to include this, the youtube ID should be enough because it already is unique, or at least it should be.

I use the Movie Library and I cannot use ASS for that kind of library.

@ZeroQI
Copy link
Owner

ZeroQI commented Jan 16, 2023

Some characters in filename cause an issue
it seems the GUID contain the title and if special characters are there, it fails...

@ZeroQI ZeroQI added the bug Something isn't working label Jan 16, 2023
@stegmajo
Copy link

stegmajo commented Jun 26, 2023

I have this issue very often. For example for the channel Yakari, most videos have a title, which contains the special characters "ᴴᴰ". I assume that this special characters break the scanner.

@ZeroQI is there any bugfix planned? I could also try to support with a PR. The only question is: How to solve this bug? Would it be an option to remove characters from the title which are not fitting? As side-effect the titles would look different in Plex than on Youtube. But when it is used for the GUID generation, it's better to have a slightly wrong title than no imported metadata...

@ZeroQI
Copy link
Owner

ZeroQI commented Jun 26, 2023

First: would plex agent and scanner have an issue with the character? Maybe it's not fixabke
One would dévide à test for chars and an action to fix, but am clueless on how to implement it...
If somebody found python code to solve such problems in other agents or software sanitizing filenames, it could be ported over...
Find which string what to remove to make it work and the command to do so...
I fix on my phone if I can fix in one go but not using this agent for myself so no bugfix planned honestly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants