ZeroQI / YouTube-Agent.bundle

Plex Metadata Agent for Movies and TV Series libraries
452 stars 43 forks source link

Agent not handling special characters well #79

Closed reddragonguy closed 3 years ago

reddragonguy commented 3 years ago

youtubeagent.log

I recently reverted how i download files back to not removing special characters. Here's the log when it tries to process a channel with the "TM" symbol in the channel name.

ZeroQI commented 3 years ago

The error comes AFTER the end of my code, i don't know hot to solve this Plex issue...

2021-03-17 09:21:28,809 (7fbbd27fc700) :  INFO (__init__:518) - === End Of Agent Call, errors after that are Plex related ===================================================================================================
2021-03-17 09:21:28,811 (7fbbd27fc700) :  CRITICAL (model:192) - Exception serializing TV_Show with guid 'com.plexapp.agents.youtube://youtube|UCe0TLA0EsQbE-MjuHXevj2A|ATHLEAN-X™ [UCe0TLA0EsQbE-MjuHXevj2A]?lang=xn' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c073686f2/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 190, in _write
    self._serialize(os.path.join(self._storage_path, subdir))
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-c073686f2/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 215, in _serialize
    el.set('id', self._id)
  File "lxml.etree.pyx", line 699, in lxml.etree._Element.set (lxml-2.3/src/lxml/lxml.etree.c:34531)
  File "apihelpers.pxi", line 563, in lxml.etree._setAttributeValue (lxml-2.3/src/lxml/lxml.etree.c:15781)
  File "apihelpers.pxi", line 1366, in lxml.etree._utf8 (lxml-2.3/src/lxml/lxml.etree.c:22211)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

Try to remove the TM character in folde name "ATHLEAN-X™ [UCe0TLA0EsQbE-MjuHXevj2A]" Same issue as https://github.com/ZeroQI/YouTube-Agent.bundle/issues/28 Closing this one