Local Media Agent errors when paths/files contained non-ASCII characters.

This was supposedly fixed in version 1.2.1, but I still have the problem. My file is named “Brandmand Sam S06E07 - Pølserne Mod Rejerne.m4v”. When I scan it, the Local Media Agent don’t read the Title and both show.jpg and season06.jpg is not added. If i rename the file to “Brandmand Sam S06E07 - Polserne Mod Rejerne.m4v” everything works.

Which server platform?
for Linux there is an unofficial fix available here: https://forums.plex.tv/discussion/comment/1255641/#Comment_1255641
(make sure to read the whole thread)

for some QNAP models there is a fix here

For Synology, the patch is here: https://forums.plex.tv/discussion/221772/subtitles-not-appearing/p4

It’s the same code. Only the directory paths are different between Synology and QNAP.

As pointed out by OttoKerner, please read the whole thread.

I have the same problem with Windows PMS.
Is it supposed to be fixed ? If so, which version fixed it ?

Currently I’m running a script that removes non-ascii characters (from char set 1252) and local media gets picked up as soon as non-ascii character is removed.
But its a lot of hassle if the show that is being renamed already has folder created. - so I’d like to upgrade to PMS that has this issue resolved.

Thanks

@ChuckPa, @OttoKerner thanks for the replies. I am running Plex from linux under Docker. I would like the devs to fix the problem especially since they state that it was fixed in there release notes. Currently I will wait, because its to much trouble having to keep editing main files there are overwritten when the server is updated.

@wally007 said:
I have the same problem with Windows PMS.
Is it supposed to be fixed ? If so, which version fixed it ?

In a pure Windows environment this is no issue. (I use regularly á ä ô and other special chars in my file names on Windows)

It may be an issue if you mount a Linux-based NAS as a media source. But then it is out of Plex’s hands and a matter of setting up SAMBA on the NAS with the right codepage parameters.


That’s not my experience. I’m on Windows10 right now and PMS is running locally with local storage.
As soon as file or parent folder has Czech characters such as “ěžňů” local media does not get scraped.

Once i clean up the parent folder name, show,season and fanart get loaded. ( i have to force scan the section )

EDIT:
Just tested it with newest PMS on the laptop and it definitely does not work with TV Shows.

    > Directory of C:\Users\baravla\Desktop	est
    > 
    > 10/10/2016  06:11 PM    <DIR>          .
    > 10/10/2016  06:11 PM    <DIR>          ..
    > 10/10/2016  06:11 PM    <DIR>          Vrazdy v kruhu Zlibam te az zabiješ
    >                0 File(s)              0 bytes
    > 
    >  Directory of C:\Users\baravla\Desktop	est\Vrazdy v kruhu Zlibam te az zabiješ
    > 
    > 10/10/2016  06:11 PM    <DIR>          .
    > 10/10/2016  06:11 PM    <DIR>          ..
    > 10/10/2016  06:53 PM    <DIR>          2016
    > 09/14/2016  09:32 PM            77,483 fanart.jpg
    > 09/14/2016  09:32 PM            15,875 poster.jpg
    > 09/14/2016  09:32 PM            19,141 season2016.jpg
    >                3 File(s)        112,499 bytes
    > 
    >  Directory of C:\Users\baravla\Desktop	est\Vrazdy v kruhu Zlibam te az zabiješ\2016
    > 
    > 10/10/2016  06:53 PM    <DIR>          .
    > 10/10/2016  06:53 PM    <DIR>          ..
    > 09/14/2016  09:28 PM     2,229,419,643 Vrazdy v kruhu Zlibam te az zabiješ  - S01E01.mp4
    >                1 File(s)  2,229,419,643 bytes
    > 
    >      Total Files Listed:
    >                4 File(s)  2,229,532,142 bytes

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="TV Shows" librarySectionUUID="d72b7409-67f0-47a0-b5e0-1cf02c1327ec" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1475168180"> <Video ratingKey="3" key="/library/metadata/3" guid="com.plexapp.agents.none://1/1/1?lang=xn" parentRatingKey="2" grandparentRatingKey="1" librarySectionID="1" librarySectionKey="/library/sections/1" type="episode" title="Episode 1" grandparentKey="/library/metadata/1" parentKey="/library/metadata/2" grandparentTitle="Vrazdy v Kruhu Zlibam Te Az Zabiješ" summary="" index="1" parentIndex="1" thumb="/library/metadata/3/thumb/1476118438" duration="4728040" addedAt="1476118436" updatedAt="1476118438" chapterSource=""> <Media videoResolution="576" id="1" duration="4728040" bitrate="3772" width="720" height="576" aspectRatio="1.78" audioChannels="2" audioCodec="mp3" videoCodec="mpeg2video" container="mp4" videoFrameRate="PAL" optimizedForStreaming="1" has64bitOffsets="0" videoProfile="main"> <Part accessible="1" exists="1" id="1" key="/library/parts/1/1473881312/file.mp4" duration="4728040" file="C:\Users\baravla\Desktop est\Vrazdy v kruhu Zlibam te az zabiješ\2016\Vrazdy v kruhu Zlibam te az zabiješ - S01E01.mp4" size="2229419643" container="mp4" has64bitOffsets="0" optimizedForStreaming="1" videoProfile="main"> <Stream id="1" streamType="1" default="1" codec="mpeg2video" index="0" bitrate="3575" anamorphic="1" bitDepth="8" chromaSubsampling="4:2:0" codecID="61" colorRange="tv" duration="4728040" frameRate="25.000" frameRateMode="cfr" height="576" level="8" pixelAspectRatio="64:45" pixelFormat="yuv420p" profile="main" refFrames="1" scanType="interlaced" streamIdentifier="1" width="720"/> <Stream id="2" streamType="2" selected="1" default="1" codec="mp3" index="1" channels="2" bitrate="192" language="Česky" languageCode="cze" audioChannelLayout="stereo" bitrateMode="cbr" codecID="6B" duration="4727904" samplingRate="48000" streamIdentifier="2"/> </Part> </Media> <Extras size="0"></Extras> </Video> </MediaContainer>

@OttoKerner, I can see in the log files that it reads the title perfectly with the special chars. So i don’t believe its a problem with how the data is mounted.

Plex dev, any input?

@Soxiz said:
@OttoKerner, I can see in the log files that it reads the title perfectly with the special chars. So i don’t believe its a problem with how the data is mounted.

I see the critical failure in the localmedia.log. I assume this is the same as on the other platforms.
Are you willing to experiment a bit and apply the same provisional fix like the linux users above?
I’d be very interested in the outcome.
(the path to the LocalMedia.bundle on Windows is C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-d34b464\LocalMedia.bundle\Contents)

@OttoKerner that was the logs from @wally007. My server is running under docker, in a linux environment. So I assume the fix you provided will fix it. But I would really like a fix from the devs.

i can experiment with test PMS on Windows platform (with local disks - just to clear up any suspicion of networked storage).

Ive been mucking with scripts that remove special characters from the path for far too long :frowning:

Fyi. im using TV personal media scanner, with local media assets checked, with TV personal media shows agent.

@wally007 said:
Fyi. im using TV personal media scanner, with local media assets checked, with TV personal media shows agent.

Should make no difference, since the failing LMA agent is involved in this scenario too.

@OttoKerner, I tried to apply your fix, sadly it didnt change a thing, I still get the same error.

2016-10-11 22:06:56,537 (7f849ffff700) : CRITICAL (agentkit:1067) - Exception in the update function of agent named 'Local Media Assets (TV)', called with guid 'com.plexapp.agents.none://493?lang=xn' (most recent call last): File "/usr/lib/plexmediaserver/Resources/Plug-ins-d34b464/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, in _update agent.update(obj, media, lang, **kwargs) File "/usr/lib/plexmediaserver/Resources/Plug-ins-d34b464/LocalMedia.bundle/Contents/Code/__init__.py", line 140, in update localmedia.findSubtitles(part) File "/usr/lib/plexmediaserver/Resources/Plug-ins-d34b464/LocalMedia.bundle/Contents/Code/localmedia.py", line 265, in findSubtitles if os.path.isfile(os.path.join(path, file_path_listing)) and not RE_METAFILES.search(file_path_listing): File "/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-474d321/lib/python2.7/genericpath.py", line 29, in isfile UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 72: ordinal not in range(128)

@dane22, maybe you know what to do? The file i am trying is named “Brandmand Sam S06E07 - Pølserne Mod Rejerne.m4v”

@Soxiz

Are you perhaps on Ubuntu 14.04?

And nice title :slight_smile:

/T

And forgot, if so, what’s your locale set to?

@dane22, i am running it on Docker from windows. The docker image is build on Ubuntu 16.04. How would i check locale? In some of the log files i can see that the filename are read correct. Let me know what you need and ill provide it. Would love to get this working for my kids :slight_smile:

@OttoKerner said:

@Soxiz said:
@OttoKerner, I can see in the log files that it reads the title perfectly with the special chars. So i don’t believe its a problem with how the data is mounted.

I see the critical failure in the localmedia.log. I assume this is the same as on the other platforms.
Are you willing to experiment a bit and apply the same provisional fix like the linux users above?
I’d be very interested in the outcome.
(the path to the LocalMedia.bundle on Windows is C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-d34b464\LocalMedia.bundle\Contents)

OK, so I’ve done the changes to helpers.py and made sure its not overwritten during start by editing info.plist as well.

It makes no difference at all. File gets added but local media (fanart, poster, season banner) dont get added and neither do embeded mp4 tags get added. As soon as I remove the special character from the Foldername and file name - all of the metadata as well as local media are added.

Considering you do this ‘all the time’ - it’s pretty strange I cant get it working…

here is the excerpt form the log

2016-10-14 20:33:53,196 (2334) : INFO (logkit:16) - Error finding media for episode: [Error 3] The system cannot find the path specified: u'\\\\?\\C:\\Users\\baravla\\Desktop\ est\\Vrazdy v kruhu Zlibam te az zabije\u0161\\2016\\*.*'

Folder name is
C:\Users\baravla\Desktop est\Vrazdy v kruhu Zlibam te az zabiješ

@wally007 said:
2016-10-14 20:33:53,196 (2334) : INFO (logkit:16) - Error finding media for episode: [Error 3] The system cannot find the path specified: u'\\\\?\\C:\\Users\\baravla\\Desktop\ est\\Vrazdy v kruhu Zlibam te az zabije\u0161\\2016\\*.*' Folder name is C:\Users\baravla\Desktop est\Vrazdy v kruhu Zlibam te az zabiješ`

Could you provide me with a list of file/folder names which are for a valid show? I’d like to recreate the issue on my system. I only need the file names, not actual files.

I’m going to start from scratch and post the logs before and after the modification. Give me 1 day.
Thanks

Seems this was a problem with the docker image. No locales was set. After setting it things started working.